cisco路由器端口映射 让外网用户能够访问内部网站服务器

发布日期:2018/12/04 08:00:00

  实验目的:

  外网用户能够访问内部网站服务器

  实验拓扑如下:

cisco路由器端口映射

  R1路由器配置如下:

  R1>en #进入特权模式

  R1#config t #进入全局配置模式

  Enter configuration commands, one per line. End with CNTL/Z.

  R1(config)#access-list 1 permit 192.168.1.0 0.0.0.255 #建立访问控制列表

  R1(config)#ip nat inside source list 1 interface S0/3/0 #建立NAT转换

  R1(config)#inter f0/0 #进入接口模式

  R1(config-if)#ip nat inside #设定NAT内部接口

  R1(config-if)#inter s0/3/0

  R1(config-if)#ip nat outside #设定NAT外部接口

  R1(config-if)#exit #退出接口模式

  R1(config)#ip nat inside source static tcp 192.168.1.200 80 10.0.0.1 80 #将192.168.1.200 80端口 映射到10.0.0.1 80端口

  R1(config)#do show ip nat tra #查看NAT转换情况

  Pro Inside global Inside local Outside local Outside global

  tcp 10.0.0.1:80 192.168.1.200:80 --- ---

  测试结果如下:

cisco路由器端口映射


同创双子为企业保驾护航

专注数字化方案建设,推动智慧企业生态圈的升级发展