Cisco ASA8.3之后使用“Network Object ”来配置NAT
一.Dynamic NAT(动态NAT,动态一对一)
传统配置方法,如:
nat (inside) 1 172.16.86.0 255.255.255.0
global (outside) 1 200.1.1.3 - 200.1.1.99
新配置方法(Network Object NAT)
1.单内网配置:
① 动态一对一
object network out-pool
range 200.1.1.3 200.1.1.99
object network in-network
subnet 172.16.86.0 255.255.255.0
nat (inside,outside) dynamic out-pool
② 动态一对一,加PAT
object network out-pool
range 200.1.1.3 200.1.1.99
object network out-pat
host 200.1.1.111
object-group network outside-address
network-object object out-pool
network-object object out-pat
object network in-network
subnet 172.16.86.0 255.255.255.0
nat (inside,outside) dynamic outside-address
(先3-99动态一对一,然后200.1.1.111动态PAT,最后使用接口地址动态PAT)
这种配置方式的好处是,新的NAT命令绑定了源接口和目的接口,所以不会出现传统配置影响DMZ的问题(当时需要nat0 acl来旁路)
二.Dynamic PAT (动态PAT,动态多对一)
传统配置方式:
nat (inside) 1 172.16.86.0 255.255.255.0
global(outside) 1 200.1.1.1
新配置方法(Network Object NAT)
object network Outside-PAT-Address
host 200.1.1.1
object network Inside-Network
subnet 172.16.86.0 255.255.255.0
nat (inside,outside) dynamic Outside-PAT-Address
or nat (inside,outside) dynamic 200.1.1.1
or nat (inside,outside) dynamic interface
三.Static NAT or Static NAT with Port Translation(静态一对一转换,静态端口转换)
①:(静态一对一转换)
传统配置方式:
static (inside,outside) 200.1.1.2 172.16.86.24
新配置方法(Network Object NAT)
object network Static-Outside-Address
host 200.1.1.2
object network Static-Inside-Address
host 172.16.86.24
nat (inside,outside) static Static-Outside-Address
or nat (inside,outside) static 200.1.1.2
②:(静态端口转换)
传统配置方式:
static (inside,outside) tcp 200.1.1.2 2323 172.16.86.24 23
新配置方法(Network Object NAT)
object network out-static
host 200.1.1.2
object network in-static
host 172.16.86.24
nat (inside,outside) static out-static service tcp 23 2323
or nat (inside,outside) static 200.1.1.2 service tcp 23 2323
access-list out permit tcp any 172.16.86.24 eq 23
四.Identity NAT
传统配置方式:
nat (inside) 0 172.16.0.25 255.255.255.255
新配置方法(Network Object NAT)
object network Inside-Address
host 172.16.0.25
nat (inside,outside) static Inside-Address
or nat (inside,outside) static 172.16.0.25