1. 端口映射配置命令

    1
    2
    3
    netsh interface portproxy add v4tov4 listenaddress=192.168.1.166 listenport=11122 connectaddress=192.168.1.128 connectport=22
    # 或者
    netsh interface portproxy add v4tov4 listenport=11122 connectaddress=192.168.1.128 connectport=22
  2. 查看端口映射列表

    1
    netsh interface portproxy show v4tov4
  3. 删除指定端口映射项

    1
    2
    3
    netsh interface portproxy delete v4tov4 listenaddress=192.168.1.166 listenport=11122
    #或者
    netsh interface portproxy delete v4tov4 listenport=11122