通过端口映射技术将WEB服务器发布到Internet

admin 2023年10月10日23:32:48评论57 views字数 2094阅读6分58秒阅读模式

动动大拇指

通过端口映射技术将WEB服务器发布到Internet

快快关注哦

一、配置目前网络环境
实验目标:
一家新创建的IT公司,公司位于北京有80多台服务器
目前网络环境使用技术,通过端口映射技术将web服务器发布给Internet:
  • 三层交换:汇聚接入层交换机
  • 默认路由:实现到互联网数以万计网络访问的简化配置
  • 静态路由:实现公司内部网络互通
  • NAT端口映射:实现企业内部Web服务器的发布
二、实验方案:
通过端口映射技术将web服务器发布给Internet,公司现有网络环境拓扑如下图所示:
通过端口映射技术将WEB服务器发布到Internet
现有网络连接说明如下表所示:
通过端口映射技术将WEB服务器发布到Internet
三、实验步骤:
步骤一:根据表-1为设备配置IP地址,并为三层交换机开启路由功能
1)MS1配置vlan1与f0/1接口的IP地址并开启路由功能
Switch(config)#hostname MS1MS1(config)#ip routingMS1(config)#interface vlan 1MS1(config-if)#ip address 192.168.1.252 255.255.255.0MS1(config-if)#no shutdownMS1(config-if)#exitMS1(config-if)#interface fastEthernet 0/1MS1(config-if)#no switchportMS1(config-if)#ip address 192.168.2.1 255.255.255.0MS1(config-if)#no shutdown
步骤二:为路由器配置IP地址,添加接口模块
1)为路由器添加接口模块并进入路由器接口配置IP地址
Router(config)#hostname R1R1(config)#interface fastEthernet 0/0R1(config-if)#ip address 192.168.2.2 255.255.255.0R1(config-if)#no shutdownR1(config-if)#exitR1(config)#interface fastEthernet 1/0R1(config-if)#ip address 61.159.62.129 255.255.255.248R1(config-if)#no shutdown
步骤三:配置MS1和路由器的静态路由
MS1(config-if)#ip route 0.0.0.0 0.0.0.0 192.168.2.2R1(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1
步骤四:测试server1与R1接口IP的连通性
PC>ping 192.168.2.2Pinging 192.168.2.2 with 32 bytes of data:Reply from 192.168.2.2: bytes=32 time=0ms TTL=254Reply from 192.168.2.2: bytes=32 time=0ms TTL=254Reply from 192.168.2.2: bytes=32 time=0ms TTL=254Reply from 192.168.2.2: bytes=32 time=1ms TTL=254Ping statistics for 192.168.2.2:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:Minimum = 0ms, Maximum = 1ms, Average = 0msPC>ping 61.159.62.129Pinging 61.159.62.129 with 32 bytes of data:Reply from 61.159.62.129: bytes=32 time=1ms TTL=254Reply from 61.159.62.129: bytes=32 time=0ms TTL=254Reply from 61.159.62.129: bytes=32 time=2ms TTL=254Reply from 61.159.62.129: bytes=32 time=0ms TTL=254Ping statistics for 61.159.62.129:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:Minimum = 0ms, Maximum = 2ms, Average = 0ms
步骤五:R1配置端口映射
R1(config)#ip nat inside source static tcp 192.168.1.8 80 61.159.62.131 80R1(config)#interface fastEthernet 0/0R1(config-if)#ip nat insideR1(config)#interface f1/0R1(config-if)#ip nat outside
步骤六:在PC7上查看是映射结果,如下图所示
通过端口映射技术将WEB服务器发布到Internet

通过端口映射技术将WEB服务器发布到Internet

长按二维码

关注更多精彩

通过端口映射技术将WEB服务器发布到Internet

看都看完了,不如点这里试试

通过端口映射技术将WEB服务器发布到Internet

原文始发于微信公众号(老五说网络):通过端口映射技术将WEB服务器发布到Internet

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2023年10月10日23:32:48
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   通过端口映射技术将WEB服务器发布到Internethttps://cn-sec.com/archives/2100303.html

发表评论

匿名网友 填写信息