#显示所有端口转发
netsh interface portproxy show all
#显示已有端口转发语句
netsh interface portproxy dump
#新增远程使用端口转发
netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=7008 connectaddress=远程ip connectport=3128
#新增本机使用端口转发
netsh interface portproxy add v4tov4 listenaddress=127.0.0.1 listenport=7008 connectaddress=远程ip connectport=3128
#删除端口转发
netsh interface portproxy delete v4tov4 listenaddress=0.0.0.0 listenport=7002
#修改转发规则
netsh interface portproxy set v4tov4 listenaddress=127.0.0.1 listenport=7002 connectaddress=远程ip connectport=3390
#重置所有的端口转发(清空)
netsh interface portproxy reset
标签:netsh,windows,0.0,端口,portproxy,转发,interface From: https://www.cnblogs.com/chuanghongmeng/p/17911148.html