目录
1.网络通讯图如下
2.配置端口映射命令
配置映射
netsh interface portproxy add v4tov4 listenaddress=本机ip listenport=本机端口 connectaddress=映射ip connectport=映射端口
查看映射
netsh interface portproxy show v4tov4
删除映射
netsh interface portproxy delete v4tov4 listenaddress=本机ip listenport=本机端口号
3.用例
一、SSH配置:
netsh interface portproxy add v4tov4 listenaddress=xxx.xxx.xxx.94 listenport=9999 connectaddress=192.168.126.130 connectport=22
netsh interface portproxy delete v4tov4 listenaddress=xxx.xxx.xxx.94 listenport=9999
查看映射
netsh interface portproxy show v4tov4
二、telnetd配置
netsh interface portproxy add v4tov4 listenaddress=xxx.xxx.xxx.94 listenport=9999 connectaddress=192.168.126.130 connectport=23
netsh interface portproxy delete v4tov4 listenaddress=xxx.xxx.xxx.94 listenport=9999
查看映射
netsh interface portproxy show v4tov4
4.xshell配置
xshell的ssh访问需要配置隧道,否则无法连接