ssh内网穿透实现公网访问内网server

内网:

ssh -CfNg -R 2222:127.0.0.1:22 dy@120.25.208.100

公网:

ssh -CfNg -L 8080:127.0.0.1:3000 -p 2222 ubuntu@localhost

公网ssh连接内网:

ssh -p 2222 ubuntu@localhost

 

 

校园网内网执行以下语句,将公网139.59.118.193:3000的请求转发到本机127.0.0.1:80进行数据处理然后返回,公网服务器须用nginx将请求转发到3000端口,

直接访问3000端口访问不到

ssh -CfNg -R 3000:127.0.0.1:80 root@139.59.118.193

相关文章:

http://blog.csdn.net/a351945755/article/details/21785647 

http://blog.chinaunix.net/uid-7530389-id-2050093.html 

http://www.linuxdown.net/command/2016/0612/5855.html 

http://ip.zdaye.com/daili/ip/4847.html 

http://www.nat123.com/Pages_8_260.jsp 

posted @ 2017-04-18 00:18  cdongyang  阅读(304)  评论(0编辑  收藏  举报