Windows操作防火墙命令
启用防火墙:
netsh advfirewall set allprofiles state on
禁用防火墙:
netsh advfirewall set allprofiles state off
添加新的入站规则允许端口80(HTTP):
netsh advfirewall firewall add rule name="Allow HTTP" dir=in action=allow protocol=TCP localport=80
删除入站规则:
netsh advfirewall firewall delete rule name="Allow HTTP"