napt+nat server+acl简单配置

 

服务器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服务器正常

 

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值