Object Group Acl
Object Group Acl
The Object Groups for ACLs feature lets you classify users, devices, or protocols into groups and apply
those groups to access control lists (ACLs) to create access control policies for those groups. This feature
lets you use object groups instead of individual IP addresses, protocols, and ports, which are used in
conventional ACLs. This feature allows multiple access control entries (ACEs), but now you can use each
ACE to allow an entire group of users to access a group of servers or services or to deny them from doing
so.
In large networks, the number of ACLs can be large (hundreds of lines) and difficult to configure and
manage, especially if the ACLs frequently change. Object group-based ACLs are smaller, more readable,
and easier to configure and manage than conventional ACLs, simplifying static and dynamic ACL
deployments for large user access environments on Cisco IOS routers.
Cisco IOS Firewall benefits from object groups, because they simplify policy creation (for example, group
A has access to group A services).
Finding Feature Information, page 1
Restrictions for Object Groups for ACLs, page 2
Information About Object Groups for ACLs, page 2
How to Configure Object Group-Based ACLs, page 3
Configuration Examples for Object Groups for ACLs, page 14
Additional References, page 16
Feature Information for Object Groups for ACLs, page 17
Americas Headquarters:
Cisco Systems, Inc., 170 West Tasman Drive, San Jose, CA 95134-1706 USA
Object Groups
Restrictions for Object Groups for ACLs
Object Groups
An object group can contain a single object (such as a single IP address, network, or subnet) or multiple
objects (such as a combination of multiple IP addresses, networks, or subnets).
A typical ACE could allow a group of users to have access only to a specific group of servers. In an object
group-based ACL, you can create a single ACE that uses an object group name instead of creating many
ACEs (which would require each one to have a different IP address). A similar object group (such as a
protocol port group) can be extended to provide access only to a set of applications for a user group to a
server group. ACEs can have object groups for the source only, destination only, none, or both.
You can use object groups to separate the ownership of the components of an ACE. For example, each
department in an organization could control its group membership, and the administrator could own the
ACE itself to control which departments can contact one another.
You can use object groups as members (children) of other object groups. For example, you can create an
ENG-ALL address group that contains the ENG-EAST and ENG-WEST address groups. You can use an
unlimited number of levels of nested (child) object groups (however, a maximum of two levels is
recommended).
You can use object groups in features that use Cisco Policy Language (CPL) class maps.
This feature supports two types of object groups for grouping ACL parameters: network object groups and
service object groups. These object groups can be used to group IP addresses, protocols, protocol services
(ports), and Internet Control Message Protocol (ICMP) types.
Objects Allowed in Network Object Groups, page 3
2
ACLs Based on Object Groups
Objects Allowed in Network Object Groups
3
Creating a Network Object Group
How to Configure Object Group-Based ACLs
addresses) or service object groups (which use operators such as lt, eq, gt, neq, and rangewith port
numbers). Then, you create ACEs that apply a policy (such as permit or deny) to those object groups.
Creating a Network Object Group, page 4
Creating a Service Object Group, page 6
Creating an Object Group-Based ACL, page 9
Applying an Object Group-Based ACL to an Interface, page 12
Verifying Object Groups for ACLs, page 13
SUMMARY STEPS
1. enable
2. configure terminal
3. object-group network object-group-name
4. description description-text
5. host {host-address | host-name}
6. network-address {/ nn | network-mask}
7. range host-address1 host-address2
8. any
9. group-object nested-object-group-name
10. Repeat some combination of Steps Creating a Network Object Group, page 4 through Creating a
Network Object Group, page 4 until you have specified the objects on which you want to base your
object group.
11. end
DETAILED STEPS
Router> enable
4
Creating a Network Object Group
How to Configure Object Group-Based ACLs
Example:
Step 3 object-group network object-group-name Defines the object group name and enters network object-group
configuration mode.
Example:
Router(config-network-group)# description
test engineers
Step 5 host {host-address | host-name} (Optional) Specifies the IP address or name of a host.
If you specify a host address, you must use an IPv4 address.
Example:
Router(config-network-group)# host
209.165.200.237
Router(config-network-group)#
209.165.200.241 255.255.255.224
5
Creating a Service Object Group
How to Configure Object Group-Based ACLs
Example:
Router(config-network-group)# any
Step 9 group-object nested-object-group-name (Optional) Specifies a nested (child) object group to be included in
the current (parent) object group.
The type of child object group must match that of the parent
Example:
(for example, if you are creating a network object group, you
Router(config-network-group)# group-object must specify another network object group as the child).
my_nested_object_group You can use duplicated objects in an object group only via
nesting of group objects. For example, if object 1 is in both
group A and group B, you can define a group C that includes
both A and B. However, you cannot include a group object
that causes the group hierarchy to become circular (for
example, you cannot include group A in group B and then also
include group B in group A).
You can use an unlimited number of levels of nested object
groups (however, a maximum of two levels is recommended).
Example:
Router(config-network-group)# end
6
Creating a Service Object Group
How to Configure Object Group-Based ACLs
SUMMARY STEPS
1. enable
2. configure terminal
3. object-group service object-group-name
4. description description-text
5. protocol
6. tcp | udp | tcp-udp [source {{[eq] | lt | gt} port1 | range port1 port2}] [{[eq] | lt | gt} port1 | range
port1 port2]
7. icmp icmp-type
8. group-object nested-object-group-name
9. Repeat some combination of Steps Creating a Service Object Group, page 6 through Creating a Service
Object Group, page 6 until you have specified the objects on which you want to base your object
group.
10. end
DETAILED STEPS
Router> enable
Example:
Step 3 object-group service object-group-name Defines the object group name and enters service object-
group configuration mode.
Example:
7
Creating a Service Object Group
How to Configure Object Group-Based ACLs
Example:
Router(config-service-group)# ahp
Step 6 tcp | udp | tcp-udp [source {{[eq] | lt | gt} port1 | range (Optional) Specifies TCP, UDP, or both.
port1 port2}] [{[eq] | lt | gt} port1 | range port1 port2]
Example:
Example:
8
Creating an Object Group-Based ACL
How to Configure Object Group-Based ACLs
Example:
Router(config-service-group)# end
SUMMARY STEPS
1. enable
2. configure terminal
3. ip access-list extended access-list-name
4. remark remark
5. deny protocol source [source-wildcard] destination [destination-wildcard] [option option-name]
[precedence precedence] [tos tos] [established] [log | log-input] [time-range time-range-name]
[fragments]
6. remark remark
7. permit protocol source [source-wildcard] destination [destination-wildcard] [option option-name]
[precedence precedence] [tos tos] [established] [log | log-input] [time-range time-range-name]
[fragments]
8. Repeat some combination of Steps 4 through 7 until you have specified the fields and values on which
you want to base your access list.
9. end
DETAILED STEPS
Router> enable
9
Creating an Object Group-Based ACL
How to Configure Object Group-Based ACLs
Example:
Step 3 ip access-list extended access-list-name Defines an extended IP access list using a name and enters extended
access-list configuration mode.
Example:
Router(config)# ip access-list
extended nomarketing
Step 4 remark remark (Optional) Adds a user-friendly comment about an access list entry.
A remark can precede or follow an access list entry.
Example: In this example, the remark reminds the network administrator that
the subsequent entry denies the Marketing network access to the
Router(config-ext-nacl)# remark interface.
protect server by denying access from
the Marketing network
10
Creating an Object Group-Based ACL
How to Configure Object Group-Based ACLs
Step 6 remark remark (Optional) Adds a user-friendly comment about an access list entry.
A remark can precede or follow an access list entry.
Example:
11
Applying an Object Group-Based ACL to an Interface
How to Configure Object Group-Based ACLs
Step 8 Repeat some combination of Steps 4 through 7 Remember that all sources not specifically permitted are denied by an
until you have specified the fields and values implicit deny statement at the end of the access list.
on which you want to base your access list.
Step 9 end Returns to privileged EXEC mode.
Example:
Router(config-ext-nacl)# end
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. ip access-group {access-list-name | access-list-number} {in | out}
5. end
12
Verifying Object Groups for ACLs
How to Configure Object Group-Based ACLs
DETAILED STEPS
Router> enable
Example:
Step 3 interface type number Specifies the interface type and number and enters
interface configuration mode.
Example:
Step 4 ip access-group {access-list-name | access-list-number} {in | Applies the ACL to the interface and specifies
out} whether to filter inbound or outbound packets.
Example:
Example:
Router(config-if)# end
SUMMARY STEPS
1. enable
2. show object-group [object-group-name]
3. show ip access-list [access-list-name]
13
Example Creating a Network Object Group
Configuration Examples for Object Groups for ACLs
DETAILED STEPS
Router> enable
Step 2 show object-group [object-group-name] Displays the configuration in the named or numbered object group
(or in all object groups if no name is entered).
Example:
Step 3 show ip access-list [access-list-name] Displays the contents of the named or numbered access list or object
group-based ACL (or for all access lists and object group-based
ACLs if no name is entered).
Example:
Router> enable
Router# configure terminal
Router(config)# object-group network my_network_object_group
Router(config-network-group)# host 209.165.200.237
Router(config-network-group)# host 209.165.200.238
Router(config-network-group)# range 209.165.200.239 209.165.200.240
Router(config-network-group)# 209.165.200.241 255.255.255.224
The following example shows how to create a network object group named sjc_ftp_servers, which contains
two hosts, a subnet, and an existing object group (child) named sjc_eng_ftp_servers as objects:
Router> enable
Router# configure terminal
Router(config)#object-group network sjc_ftp_servers
Router(config-network-group)# host sjc.eng.ftp
14
Example Creating a Service Object Group
Configuration Examples for Object Groups for ACLs
Router> enable
Router# configure terminal
Router(config)# object-group service my_service_object_group
Router(config-service-group)# icmp echo
Router(config-service-group)# tcp smtp
Router(config-service-group)# tcp telnet
Router(config-service-group)# tcp source range 1 65535 telnet
Router(config-service-group)# udp domain
Router(config-service-group)# tcp-udp range 2000 2005
Router(config-service-group)# group-object sjc_eng_svcs
Router> enable
Router# configure terminal
Router(config)# ip access-list extended my_ogacl_policy
Router(config-ext-nacl)# permit object-group my_service_object_group object-group
my_network_object_group any
Router(config-ext-nacl)# deny tcp any any
Router(config-ext-nacl)# exit
Router(config)# exit
Router> enable
Router# configure terminal
Router(config)# interface vlan 100
Router(config-if)# ip access-group my_ogacl_policy in
Router(config-if)# end
Router> enable
Router# show object-group
Network object group auth_proxy_acl_deny_dest
host 209.165.200.235
Service object group auth_proxy_acl_deny_services
tcp eq www
tcp eq 443
Network object group auth_proxy_acl_permit_dest
209.165.200.226 255.255.255.224
209.165.200.227 255.255.255.224
15
Example Verifying Object Groups for ACLs
Additional References
209.165.200.228 255.255.255.224
209.165.200.229 255.255.255.224
209.165.200.246 255.255.255.224
209.165.200.230 255.255.255.224
209.165.200.231 255.255.255.224
209.165.200.232 255.255.255.224
209.165.200.233 255.255.255.224
209.165.200.234 255.255.255.224
Service object group auth_proxy_acl_permit_services
tcp eq www
tcp eq 443
The following example shows how to display information about specific object group-based ACLs:
Additional References
Related Documents
Cisco IOS commands Cisco IOS Master Commands List, All Releases
Standards
Standard Title
None --
MIBs
RFCs
RFC Title
No new or modified RFCs are supported by this --
feature, and support for existing RFCs has not been
modified by this feature.
16
Example Verifying Object Groups for ACLs
Feature Information for Object Groups for ACLs
Technical Assistance
Description Link
The Cisco Support and Documentation website http://www.cisco.com/cisco/web/support/
provides online resources to download index.html
documentation, software, and tools. Use these
resources to install and configure the software and
to troubleshoot and resolve technical issues with
Cisco products and technologies. Access to most
tools on the Cisco Support and Documentation
website requires a Cisco.com user ID and
password.
17
Example Verifying Object Groups for ACLs
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S.
and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks.
Third-party trademarks mentioned are the property of their respective owners. The use of the word partner
does not imply a partnership relationship between Cisco and any other company. (1110R)
Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be
actual addresses and phone numbers. Any examples, command display output, network topology diagrams,
and other figures included in the document are shown for illustrative purposes only. Any use of actual IP
addresses or phone numbers in illustrative content is unintentional and coincidental.
18