有关ASA的Object-Group

 ASA的Object Group可以将具有相同特性的对象组织起来,这样可以减少ACE的配置的条目,进而减少配置,便于管理。
 
Object groups can be thought of as a type of macro used within access lists. You can define several different types of object groups, each containing a list of similar values, as follows:( Object Grou的类型有:)

Network object group Contains one or more IP addresses

ICMP object group Contains one or more ICMP types

Protocol object group Contains one or more IP protocols

Service object group Contains one or more UDP or TCP port numbers


    在创建Object Group以后,可以在一个ACE中调用,这样可以将ACE的条目缩小为1个;同时,你也可以将一个Object Group嵌套到另外一个Object Group中
 
    语法:
    
object-group {{protocol | network | icmp-type} grp_id | service grp_id {tcp | udp | tcp-udp}}
 

object-group ——定义一个对象组

protocol —— 指定IP协议(协议类型1到254),或名称标识,比如TCP、UDP、ICMP、GRP和IGMP;如果想包含所有的IP协议,可以使用关键字IP

network —— 指定host,subnet或网络地址;

icmp-type —— 指定ICMP类型,比如echo、echo-reply已经traceroute;


grp_id —— 自动4层TCP和UDP协议的端口号;

tcp —— 指定一组TCP服务,比如HTTP,FTP,Telnet和SMTP等

udp —— 指定一组UDP服务,比如DNS,TFTP和ISAKMP等

tcp-udp —— 指定一组即使用TCP又使用UDP的服务,比如DNS和Kerberos等


 

有关ASA的Object-Group_第1张图片

例:
Firewall(config)# access-list anti_spoof deny ip 10.0.0.0 255.0.0.0 any
Firewall(config)# access-list anti_spoof deny ip 172.16.0.0 255.240.0.0 any
Firewall(config)# access-list anti_spoof deny ip 192.168.0.0 255.255.0.0 any

This could also be configured by referencing a network object group, which would simplify the access list:

Firewall(config)# object-group network rfc1918
Firewall(config-network)# network-object 10.0.0.0 255.0.0.0
Firewall(config-network)# network-object 172.16.0.0 255.240.0.0
Firewall(config-network)# network-object 192.168.0.0 255.255.0.0
Firewall(config-network)# exit
Firewall(config)# access-list anti_spoof deny ip object-group rfc1918 any

 


详细内容参考《Cisco - Cisco ASA and PIX Firewall Handbook(2005).chm》

6-3. Controlling Access with Access Lists

 

 

你可能感兴趣的:(职场,休闲,asa,object-group)