windows port forwarding netsh

Original Address

ListenAddress   # local monitor the IP 
of listenport # local listening port 

connectaddress # forwards the request received from the host IP 
ConnectPort # forwards the request received from the host port 
# Run 
the netsh interface the portproxy the Add for v4tov4 ListenAddress = LocalIP of listenport = localPort connectaddress = remoteip ConnectPort = RemotePort
 # View existing configuration 
netsh interface that the portproxy Show All
 # delete the original port forwarding 
netsh interface portproxy delete v4tov4 listenaddress = localip listenport = localport

Examples

#添加
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

 

Guess you like

Origin www.cnblogs.com/hei-hei-hei/p/11797046.html