listenaddress # 本地监听的ip listenport # 本地监听的端口 connectaddress # 转发请求接收的主机ip connectport # 转发请求接收的主机的端口 # 执行命令 netsh interface portproxy add v4tov4 listenaddress=localip listenport=localport connectaddress=remoteip connectport=remoteport # 查看现有的配置 netsh interface portproxy show all # 删除原有的端口转发 netsh interface portproxy delete v4tov4 listenaddress=localip listenport=localport
示例
#添加 netsh interface portproxy add v4tov4 listenaddress=192.168.15.89 listenport=2222 connectaddress=192.168.15.35 connectport=22 #删除 netsh interface portproxy delete v4tov4 listenaddress=192.168.15.89 listenport=2222 #查看 netsh interface portproxy show all