windows自带的端口转发netsh interface portproxy

cmd中的操作demo

netsh interface portproxy的微软帮助文档地址:
https://technet.microsoft.com/zh-cn/library/cc776297(WS.10).aspx#BKMK_1

要用管理员运行cmd

  1. 新增端口转发:
    首先打开命令提示符(cmd)
    netsh interface portproxy add v4tov4 listenport=监听端口 connectaddress=转发到的地址 connectport=转发到的端口
    例子: netsh interface portproxy add v4tov4 listenport=9988 connectaddress=192.168.88.110 connectport=9988

  2. 查看转发了哪些端口
    netsh interface portproxy show all

  3. 删除转发规则
    netsh interface portproxy delete v4tov4 listenaddress=192.168.88.110 listenport=9988

删除的时候遇到了一些问题,windows自带的端口转发netsh interface portproxy
后面是删了监听这个端口的所有监听地址windows自带的端口转发netsh interface portproxy

使用netsh interface portproxy记得配置Windows和出口路由器防火墙规则