2017-05-15 19:47:14

关闭WannaCry勒索病毒可能利用的端口(135 137 138 139 445)

快速关闭办法

  1. 新建一个记事本文件 closePort.txt
    alt
  2. 复制下面代码到txt文件中

    代码

    echo close-port & netsh firewall set opmode mode = enable & netsh advfirewall firewall add rule name = "Disable port 135 - TCP" dir = in action = block protocol = TCP localport = 135 & netsh advfirewall firewall add rule name = "Disable port 135 - UDP" dir = in action = block protocol = UDP localport = 135 & netsh advfirewall firewall add rule name = "Disable port 137 - TCP" dir = in action = block protocol = TCP localport = 137 & netsh advfirewall firewall add rule name = "Disable port 137 - UDP" dir = in action = block protocol = UDP localport = 137 & netsh advfirewall firewall add rule name = "Disable port 138 - TCP" dir = in action = block protocol = TCP localport = 138 & netsh advfirewall firewall add rule name = "Disable port 138 - UDP" dir = in action = block protocol = UDP localport = 138 & netsh advfirewall firewall add rule name = "Disable port 139 - TCP" dir = in action = block protocol = TCP localport = 139 & netsh advfirewall firewall add rule name = "Disable port 139 - UDP" dir = in action = block protocol = UDP localport = 139 & netsh advfirewall firewall add rule name = "Disable port 445 - TCP" dir = in action = block protocol = TCP localport = 445 & netsh advfirewall firewall add rule name = "Disable port 445 - UDP" dir = in action = block protocol = UDP localport = 445
    

    效果
    alt

  3. 修改文件名称为 closePort.bat (主要是后缀名)
    alt

alt

  1. 单击鼠标右键管理员运行
    alt
  2. 关闭成功
    alt alt

上面的步骤麻烦?

  1. 直接下载
    点击下载
  2. 管理员运行
    alt

不想下载东西?

  1. win + x
    alt
  2. 命令提示符(管理员)(A)
    alt
  3. 复制上面的代码 > 粘贴 > 回车 alt
  4. 关闭成功
    alt alt

本文链接:https://www.paishouba.com/post/close-port.html

-- EOF --

Comments