nat (inside)1 192.168.1.0 255.255.255.0
global (outside) 1 200.1.1.2
access-list 100 permit ip any host 200.1.1.2
access-group 100 in int outside
nat (dmz) 1 172.16 1.0 255.255.255.0//上面用1了,这里换个别的号,比如2
global (outside) 1 200.1.1.3 //同上
access-list 100 permit ip any host 200.1.1.3
access-group 100 in int outside
NAT:共4步:
找到要配置的路由器:
1,内网接口:
ip nat inside
2,外网接口
ip nat outside
3,使用访问控制列表来定义范围:
全局:
access-list 1 permit 192.168.1.0 0.0.0.255
4,全局:
ip nat inside source list 1 interface s 1/0 overload
(注意:使用指定接口,防止下一跳地址改变导致nat不可实现)
端口映射,反向NAT
IP:
ip nat inside source static 192.168.1.1 202.106.1.5
端口:
ip nat inside source static tcp 192.168.1.1 80 202.106.1.10 80
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)