步骤六-NAT配置
两个要求:
-
内网用户上网时转成公网地址的NAT转换
步骤:
- 在出口路由器R1上创建访问控制列表acl 2000,来匹配内网待转换的私网地址段(允许哪些内网的网段转换成外网地址)rule permit source 192.168.0.0 0.0.255.255
- 在R1上的出口接口调用(进入接口后,nat outbound 2000)
-
将web服务器的80端口映射出去,允许外网用户访问
#用户上网需求
#R1
acl 2000
rule permit source 192.168.0.0 0.0.255.255
int gi3/0/0
nat outbound 2000
int gi0/0/1
nat outbound 2000
#映射web服务器80端口
#在出口路由器的出接口即gi3/0/0和gi0/0/1上配置
#R1
int gi3/0/0
nat server protocol tcp global current-interface 80 inside 192.168.200.10 80
int gi0/0/1
nat server protocol tcp global current-interface 80 inside 192.168.200.10 80