A服务器能访问B服务器 ,无法访问C服务器。在B服务器建立代理,可以访问让A可以访问C
参考地址:https://blog.csdn.net/RestoreJustice/article/details/130544147
用本地的8222端口进行代理,被代理的目标IP是192.168.66.24 ,被代理的端口是22
netsh? ? interface? ?portproxy add? ?v4tov4 listenport=8222? ?connectaddress=192.168.66.24? connectport=22
//其中 v4tov4 指的是`本地的侦听ip协议类型`to`samba服务器p协议类型`v4代表ipv4 v6代表ipv6
//还可以修改为 v6tov6 v6tov4 v4tov6
//这里应该只能使用 v4tov4 或者v4tov6 本地只能是ipv4(可能修改 windows hosts文件可以使用别的)samba服务器可以是ipv4也可以是 ipv6netsh interface portproxy add? ?v4tov4? listenport=445? ? listenaddress=127.0.0.1? ? connectport=服务器端口? ? connectaddress=服务器ip
netsh interface portproxy show all? ?查看本地代理的情况
例子:在启动的nginx窗口下逐条添加转发规则
netsh interface portproxy add v4tov4 listenaddress=192.168.10.115 listenport=6003 connectaddress=10.11.21.229 connectport=5003
netsh interface portproxy add v4tov4 listenaddress=192.168.10.115 listenport=9003 connectaddress=10.11.21.229 connectport=9028
netsh interface portproxy add v4tov4 listenaddress=192.168.10.115 listenport=9004 connectaddress=192.168.10.115 connectport=3389
netsh interface portproxy add v4tov4 listenaddress=192.168.10.115 listenport=9005 connectaddress=10.11.21.229 connectport=8810
netsh interface portproxy add v4tov4 listenaddress=192.168.10.115 listenport=10099 connectaddress=10.11.21.229 connectport=10009
例子:查看添加的转发规则
netsh interface portproxy show v4tov4