添加进站允许规则和出站规则命令 netsh advfirewall firewall
netsh advfirewall firewall
为本地端口 添加进站允许规则
netsh advfirewall firewall add rule name = SQLPort1433 dir = in protocol = tcp action = allow localport = 1433 remoteip = localsubnet profile =any
为本地端口 添加出站允许规则
netsh advfirewall firewall Add rule name="www80" dir=out protocol=tcp localport=80 action=allow
也可以写为UDP 或者多个PORT
netsh advfirewall firewall Add rule name="OPEN PORT " dir=out protocol=udp localport=5000-5010 action=allow
posted on 2020-12-09 13:46 stoneyeung 阅读(4226) 评论(0) 编辑 收藏 举报