在Windows中使用netsh命令进行端口转发

在Windows中使用netsh命令进行端口转发

参数

listenaddress – 等待连接的本地IP地址
listenport – 本地侦听TCP端口
connectaddress – 将传入连接重定向到本地或远程IP地址(或DNS名称)

创建端口转发

netsh interface portproxy add v4tov4 listenaddress=127.0.0.1 listenport=29999 connectaddress=192.168.64.200 connectport=80

删除端口转发

netsh interface portproxy delete v4tov4 listenaddress=127.0.0.1 listenport=29999

显示系统中的转发规则列表

netsh interface portproxy show all

posted on 2019-09-29 08:54  宁静致远呀  阅读(1292)  评论(0编辑  收藏  举报

导航