window端口转发工具netsh

1. 查看所有的端口转发

netsh interface portproxy show all  

 

2. 创建端口转发

netsh interface portproxy add v4tov4 listenaddress=<local ip> listenport=<local port> connectaddress=<destination ip> connectport=<destination port>

 

1)例子

netsh interface portproxy add v4tov4 listenaddress=192.168.206.26 listenport=3333 connectaddress=192.168.206.28 connectport=22

 

3.删除某个端口转发

netsh interface portproxy delete v4tov4 listenaddress=<local ip> listenport=<local port>

1)例子

netsh interface portproxy delete v4tov4 listenaddress=192.168.206.26 listenport=3333

 

4.删除所有端口转发

netsh interface portproxy reset

posted @ 2024-12-19 19:43  铿锵有力自信且坚定  阅读(101)  评论(0)    收藏  举报