服务器172.16.10.10:80,映射到AR1上成为12.12.12.3:80,让外网的用户可以通过这个地址访问到A公司内网的服务器。
A企业内网访问公网通过napt协议转换,地址池有两个地址 12.12.12.4 12.12.12.54
A企业内网访问公网通过napt协议转换,地址池有两个地址 12.12.12.12
R1:
sys
sys R1
acl number 2000
rule 5 permit source 172.16.10.0 0.0.0.255
quit
nat address-group 1 12.12.12.4 12.12.12.5
#
interface GigabitEthernet0/0/0
ip address 12.12.12.1 255.255.255.0
nat server protocol tcp global 12.12.12.3 www inside 172.16.10.10 www
nat outbound 2000 address-group 1
#
interface GigabitEthernet0/0/1
ip address 172.16.10.1 255.255.255.0
quit
#
ip route-static 0.0.0.0 0.0.0.0 12.12.12.2
R2:
sys
sys R2
acl number 3000
rule 45 deny icmp source 10.1.1.4 0
rule 50 deny ip source 10.1.1.5 0
rule 100 permit ip source 10.1.1.0 0.0.0.255
nat address-group 1 12.12.12.12 12.12.12.12
#
interface GigabitEthernet0/0/0
ip address 12.12.12.2 255.255.255.0
traffic-filter outbound acl 3000
nat outbound 3000 address-group 1
#
interface GigabitEthernet0/0/1
ip address 10.1.1.1 255.255.255.0
quit
ip route-static 0.0.0.0 0.0.0.0 12.12.12.1
如下图,客户端访问http服务器正常