通过外网访问内网服务器

一、可以通过netsh在外网服务器添加端口映射来实现。

 

1、新增映射

netsh interface portproxy add v4tov4 listenaddress=公网IP listenport=侦听端口号

connectaddress=内网IP connectport=链接到的端口号

2、删除映射

netsh interface portproxy delete v4tov4 listenaddress=公网IP listenport=侦听端口号

3、查看映射

netsh interface portproxy show all

 

二、参考资料

https://help.aliyun.com/document_detail/43850.html?spm=5176.7738718.2.1.KGogtD

posted @ 2017-04-18 23:40  冷风吹1016  阅读(442)  评论(0编辑  收藏  举报