为了系统安全一半服务器会开启系统防火墙去限制一些入站端口访问限制
为了高效批量添加,我整理了一个批量的脚本供参考
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
::管理员运行
net start MpsSvc
::开启服务
sc config MpsSvc start= auto
::开机启动
netsh advfirewall set allprofiles state on
::启用防火墙
::开启相关端口入站拒绝规则
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
正文完