JDP 發表於 2011-8-12 15:54:34

C# Windows Firewall 控制

Automating Windows Firewall Settings with C#
http://blogs.msdn.com/b/security ... ettings-with-c.aspx

在Vista中編程控制防火牆設定(C#)
http://www.cnblogs.com/phytan/archive/2009/01/20/814474.html

C#實現修改ip地址(呼叫netsh修改,因此可拿來控制Firewall)
http://www.7es.cn/Software_development/174.shtml

Windows Firewall Tools and Settings (netsh firewall 操作指令)
http://technet.microsoft.com/en-us/library/cc737845%28WS.10%29.aspx

Netsh Commands for Windows Firewall (for XP)
http://technet.microsoft.com/en-us/library/cc771046(WS.10).aspx

Netsh AdvFirewall Firewall Commands (for Vista/Win7/Win2008)
http://technet.microsoft.com/en-us/library/dd734783(WS.10).aspx



JDP 發表於 2011-9-23 14:07:37

新增防火牆Rule
netsh advfirewall firewall add rule name="kms1" protocol=tcp dir=in localport=1688 action=allow remoteip=10.10.10.10
修改kms1 Rule的遠端IP
netsh advfirewall firewall set rule name="kms1" new remoteip=192.168.0.0/24,192.168.1.1/32,192.168.2.1-192.168.2.10刪除防火牆Rule
netsh advfirewall firewall delete rule name="kms1"
頁: [1]
查看完整版本: C# Windows Firewall 控制