Windows配置net端口转发

Summer的小屋 2015-07-24

#如果是XP或windows server2003,则需要安装ipv6 (win7/server2008跳过此步骤)
netsh  interface ipv6 install

#添加转发规则
netsh interface portproxy add v4tov4  listenaddress=本机IP listenport=端口 connectaddress=目标IP connectport=目标端口

#删除规则
netsh interface  portproxy delete v4tov4 listenaddress=本机IP  listenport=端口

#查看已有规则
netsh interface  portproxy show  v4tov4

规则配置后即时生效,重启系统后配置信息仍然存在。

相关推荐