常用操作
1、添加端口转发
netsh interface portproxy add v4tov4 listenport=22 listenaddress=localhost connectport=22 connectaddress=172.31.147.99
2、显示端口转发列表
netsh interface portproxy show all
3、删除端口转发
netsh interface portproxy del v4tov4 listenport=22 listenaddress=localhost
4、防火墙打开程序入站
netsh advfirewall firewall add rule name="openresty" dir=in program="D:\openresty\nginx.exe" action=allow
5、防火墙禁用端口入站
netsh advfirewall firewall add rule name="网络端口" dir=in protocol=TCP localport=88,8088 action=block
6、禁用防火墙规则
netsh advfirewall firewall set rule "网络端口" new enable=no
7、删除防火墙规则
netsh advfirewall firewall delete rule name="网络端口"
© 2016-2024 清风的个人笔记