当前脚本:
cd "%ProgramFiles%\Support Tools" ipseccmd -w REG -p "IGA-B-Gone" -r "Block Outbound connections to IGA servers 72.3.184.144/28" -f 0=72.3.184.144/255.255.255.240::TCP -n BLOCK -x ipseccmd -w REG -p "IGA-B-Gone" -r "Block Outbound connections to IGA servers 72.32.5.0/28" -f 0=72.32.5.0/255.255.255.240::TCP -n BLOCK -x net stop policyagent net start policyagent
我注意到Windows 7(和Vista)不使用ipseccmd,而是使用netsh。 我不熟悉这个工具如何使用它来阻止IP范围?
我想你想netsh advfirewall firewall add rule
命令。
http://technet.microsoft.com/en-us/library/cc771920(WS.10).aspx
您可以设置按IP过滤的入站和出站规则。 您可以在GUI中创build一个自定义规则,然后使用show rule name ="blah"
来获得configuration它时设置的内容。