windows开放和关闭防火墙端口

删除记录
netsh advfirewall firewall delete rule name=USBNetworkGate1 protocol=TCP localport=5473
netsh advfirewall firewall delete rule name=USBNetworkGate2 protocol=TCP localport=5475
netsh advfirewall firewall delete rule name=USBNetworkGate3 protocol=UDP localport=5474

开放端口
netsh advfirewall firewall add rule name=USBNetworkGate1 dir=in action=allow protocol=TCP localport=5473
netsh advfirewall firewall add rule name=USBNetworkGate2 dir=in action=allow protocol=TCP localport=5475
netsh advfirewall firewall add rule name=USBNetworkGate3 dir=in action=allow protocol=UDP localport=5474