快速关闭办法
- 新建一个记事本文件 closePort.txt
复制下面代码到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
效果
修改文件名称为 closePort.bat (主要是后缀名)
- 单击鼠标右键管理员运行
- 关闭成功
上面的步骤麻烦?
- 直接下载
点击下载 - 管理员运行
不想下载东西?
- win + x
- 命令提示符(管理员)(A)
- 复制上面的代码 > 粘贴 > 回车
- 关闭成功
Comments