防火墙规则
1、允许指定程序进入,命令如下: netsh advfirewall firewall add rule name="pass nc" dir=in action=allow program="C:\nc.exe" 2、允许指定程序退出,命令如下: netsh advfirewall firewall add rule name="Allow nc" dir=out action=allow program="C:\nc.exe" 3、允许3389端口放行: netsh advfirewall firewall add rule name="Remote Desktop" protocol=TCP dir=in localport=3389 action=allow 4、自定义防火墙日志的存储位置 netsh advfirewall set currentprofile logging filename "C:\windows\temp\fw.log" 5、查看防火墙及配置 netsh firewall show config 6、停止防火墙 net stop "Windows Firewall/Internet Connection Sharing (ICS)" 7、禁用防火墙 sc config sharedaccess start= disabled
赞 (0)