windows端口转发

#显示所有端口转发
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

 

posted @ 2023-12-18 14:22  大司徒  阅读(34)  评论(0编辑  收藏  举报