使用 Windows 自带的命令行工具进行端口转发

配置转发

1
netsh interface portproxy add v4tov4 listenport=[监听端口号] listenaddress=[本地IP地址] connectport=[目标端口号] connectaddress=[目标IP地址]

查看配置

1
netsh interface portproxy show all

删除配置

1
netsh interface portproxy delete v4tov4 listenport=[监听端口号] listenaddress=[本地IP地址]