端口回流

admin 百为流控评论1,568字数 547阅读模式

需求分析

文章源自网吧系统维护-https://www.58pxe.com/1082.html

比如一个网吧,或者公司,内网网段为192.168.1.1-192.168.1.254。百为路由的LAN口(网关)比如是 192.168.1.254 。现在内网搭建web服务器,IP地址为192.168.1.253,端口80。网站需要对外提供服务,映射80端口 到企业外网光纤 113.106.100.100文章源自网吧系统维护-https://www.58pxe.com/1082.html

113.106.100.100 域名 www.bv12345678.com (即访问域名解析为113.106.100.100)文章源自网吧系统维护-https://www.58pxe.com/1082.html

文章源自网吧系统维护-https://www.58pxe.com/1082.html

现从外网访问域名,能正常访问到所搭建的网站。内网用户192.168.1.1-192.168.1.253的内网用户,无法直接访问域名,固定IP也无法访问到该网站。只能通过内网 192.168.1.253 来访问。文章源自网吧系统维护-https://www.58pxe.com/1082.html

文章源自网吧系统维护-https://www.58pxe.com/1082.html

在内网,非要通过公网IP(或者域名)来访问内网映射的资源。需要在路由加源地址转换,也就是业界俗称的“端口回流文章源自网吧系统维护-https://www.58pxe.com/1082.html

文章源自网吧系统维护-https://www.58pxe.com/1082.html

[高级配置]→[地址转换]→[源地址转换],添加规则,如下图所示文章源自网吧系统维护-https://www.58pxe.com/1082.html

  源地址IP:192.168.1.0文章源自网吧系统维护-https://www.58pxe.com/1082.html

  源地址掩码:255.255.255.0文章源自网吧系统维护-https://www.58pxe.com/1082.html

  目的地址IP:192.168.1.253文章源自网吧系统维护-https://www.58pxe.com/1082.html

  目的地址掩码:255.255.255.255文章源自网吧系统维护-https://www.58pxe.com/1082.html

  替换源IP为:113.106.100.100 (如果是拨号用户没固定IP则填写路由内网网关 192.168.1.254)文章源自网吧系统维护-https://www.58pxe.com/1082.html

端口回流文章源自网吧系统维护-https://www.58pxe.com/1082.html

文章源自网吧系统维护-https://www.58pxe.com/1082.html

文章源自网吧系统维护-https://www.58pxe.com/1082.html 文章源自网吧系统维护-https://www.58pxe.com/1082.html

版权声明:文章图片资源来源于网络,如有侵权,请留言删除!!!
广告也精彩
admin
  • 本文由 发表于 2019年3月11日 07:32:41
  • 转载请务必保留本文链接:https://www.58pxe.com/1082.html
匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: