标签:dom 命令 line 51cto 定义 xtend 调用 ice hash
一、实验拓扑:ASA(config-network-object)# object network yuan2
ASA(config-network-object)# subnet 202.100.1.0 255.255.255.0
ASA(config-network-object)# object network yuan3
ASA(config-network-object)# range 202.100.2.10 202.100.2.20
2、定义object-group,将上述打包在一起,还可以单独增加网段、主机:
打包:
ASA(config)# object-group network yuan
ASA(config-network-object-group)# network-object object yuan1
ASA(config-network-object-group)# network-object object yuan2
ASA(config-network-object-group)# network-object object yuan3
单独增加主机、网段:
ASA(config-network-object-group)# network-object 202.10.20.0 255.255.255.0 //单独增加网段
ASA(config-network-object-group)# network-object host 202.10.20.1 //单独增加主机
3、定义object-group network目的
ASA(config)# object-group network mude
ASA(config-network-object-group)# network-object host 10.1.1.1
4、定义object-group service ser:
ASA(config)# object-group service ser
ASA(config-service-object-group)# service-object esp
ASA(config-service-object-group)# service-object icmp
ASA(config-service-object-group)# service-object tcp destination eq ftp
ASA(config-service-object-group)# service-object udp destination eq domain
5、全局调用:
ASA(config)# access-list aa extended permit object-group ser object-group yuan object-group mude
四、验证:
ASA# show run object
object network yuan1
host 202.100.1.1
object network yuan2
subnet 202.100.1.0 255.255.255.0
object network yuan3
range 202.100.2.10 202.100.2.20
ASA# show run object-group
object-group network yuan
network-object object yuan1
network-object object yuan2
network-object object yuan3
network-object 202.10.20.0 255.255.255.0
network-object host 202.10.20.1
ASA# show run access-list //下边就1条
access-list aa extended permit object-group ser object-group yuan object-group mude
ASA# show access-list //下边一堆
access-list cached ACL log flows: total 0, denied 0 (deny-flow-max 4096)
alert-interval 300
access-list aa; 32 elements; name hash: 0xdd1304fa
access-list aa line 1 extended permit object-group ser object-group yuan object-group mude 0x2c352a70
access-list aa line 1 extended permit esp host 202.100.1.1 host 10.1.1.1 (hitcnt=0) 0x77cb04ed
access-list aa line 1 extended permit esp 202.100.1.0 255.255.255.0 host 10.1.1.1 (hitcnt=0) 0x260a81b4
access-list aa line 1 extended permit esp 202.100.2.10 255.255.255.254 host 10.1.1.1 (hitcnt=0) 0xaddc4366
access-list aa line 1 extended permit esp 202.100.2.12 255.255.255.252 host 10.1.1.1 (hitcnt=0) 0xaf630f92
access-list aa line 1 extended permit esp 202.100.2.16 255.255.255.252 host 10.1.1.1 (hitcnt=0) 0xd0d3bdd7
access-list aa line 1 extended permit esp host 202.100.2.20 host 10.1.1.1 (hitcnt=0) 0xa8245911
access-list aa line 1 extended permit esp 202.10.20.0 255.255.255.0 host 10.1.1.1 (hitcnt=0) 0x67408de6
6-思科防火墙:ASA中Object-group在ACL中的应用
标签:dom 命令 line 51cto 定义 xtend 调用 ice hash
原文地址:http://blog.51cto.com/13856092/2138581