Access Control Lists

Access Control Lists (ACLs) are used to control the flow of packets into and out of the system. They are configured on a per-context basis and consist of “rules” (ACL rules) or filters that control the action taken on packets that match the filter criteria. Once configured, an ACL can be applied to any of the following:

  • An individual interface
  • All traffic facilitated by a context (known as a policy ACL)
  • An individual subscriber
  • All subscriber sessions facilitated by a specific context

Understanding ACLs

This section discusses concepts about how ACLs are created, ordered, and viewed on the system. The two main aspects to consider when creating an ACL are:

Rule(s)

A single ACL consists of one or more ACL rules. As discussed earlier, the rule is a filter configured to take a specific action on packets matching specific criteria. Up to 128 rules can be configured per ACL.

IMPORTANT:

Configured ACLs consisting of no rules imply a “permit any” rule. The deny action and any criteria are discussed later in this section.

Each rule specifies the action to take when a packet matches the specifies criteria. This section discusses the rule actions and criteria supported by the system.

Actions

ACLs specify that one of the following actions can be taken on a packet that matches the specified criteria:

  • Deny: The packet is rejected.
  • Permit: The packet is accepted and processed.
  • Log: Enables logging for packets meeting the criteria specified in the ACL. The logs can be viewed by executing the logging filter active facility acl-log command in the system’s Execute mode.

IMPORTANT:

Packet logging is not supported for context-level (policy) ACLs. Subscriber-level ACL logging can be performed using the Session Manager task (sessmgr) logging facility.

Permit and Deny use the following syntax:
{ permit | deny } [ log ] { <criteria> }
Keyword/Variable Description
log

Enables logging for packets meeting the criteria specified in the ACL.

IMPORTANT:

Logging is not supported for Policy ACLs (those applied to contexts).

criteria

The criteria to compare packets against as described in the section that follows.



Criteria

Each ACL consists of one or more rules specifying the criteria that packets will be compared against. The following criteria are supported:

  • Any: Filters all packets
  • Source Address: Filter packets based on one or more source IP addresses
  • Source AoR: Filters packets based on the source address of record
  • Destination AoR: Filters packets based on the destination address of record

Each of the above criteria are described in detail in the sections that follow.

IMPORTANT:

The following sections contain basic ACL rule syntax information. Refer to the ACL Configuration Mode Commands chapter of the Command Line Interface Reference for the full command syntax.

Any

The rule applies to all packets.

The following syntax is used when configuring rule criteria that applies to all packets:
any

Source Address

The rule applies to specific packets originating from a specific source IP address or a group of source IP addresses.

The following syntax is used when configuring rule criteria that apply to one or more source IP addresses:
source address <ip_address>
<wildcard> 
Keyword/Variable Description
ip_address

The IP address(es) from which the packet originated. This option is used to filter all packets from a specific IP address or a group of IP addresses. When specifying a group of addresses, the initial address is configured using this option. The range can then be configured using the wildcard parameter.

wildcard

This option is used in conjunction with the ip_address option to specify a group of addresses for which packets are to be filtered. The mask must be entered as a complement: Zero-bits in this parameter mean that the corresponding bits configured for the ip_address parameter must be identical. One-bits in this parameter mean that the corresponding bits configured for the ip_address parameter must be ignored.

IMPORTANT:

The mask must contain a contiguous set of one-bits from the least significant bit (LSB). Therefore, allowed masks are 0, 1, 3, 7, 15, 31, 63, 127, and 255. For example, acceptable wildcards are 0.0.0.3, 0.0.0.255, and 0.0.15.255. A wildcard of 0.0.7.15 is not acceptable since the one-bits are not contiguous.



Source AoR

The rule applies to specific packets originating from a specific source address of record.

The following syntax is used when configuring rule criteria that apply to source AoRs:
source aor <aor> <wildcard>
Keyword/Variable Description
aor The address of record from which the packet originated.This option is used to filter all packets from a specific address of record or a group of AoRs. When specifying a group of addresses, the initial address is configured using this parameter. The range can then be configured using the wildcard parameter.
wildcard

This option is used in conjunction with the aor option to specify a group of addresses for which packets are to be filtered. The mask must be entered as a complement: Zero-bits in this parameter mean that the corresponding bits configured for the aor parameter must be identical. One-bits in this parameter mean that the corresponding bits configured for the aor parameter must be ignored.

IMPORTANT:

The mask must contain a contiguous set of one-bits from the least significant bit (LSB). Therefore, allowed masks are 0, 1, 3, 7, 15, 31, 63, 127, and 255. For example, acceptable wildcards are 0.0.0.3, 0.0.0.255, and 0.0.15.255. A wildcard of 0.0.7.15 is not acceptable since the one-bits are not contiguous.



Destination AoR

The rule applies to specific packets sent to a specific destination address of record.

The following syntax is used when configuring rule criteria that apply to destination AoRs:
destination aor <aor> <wildcard>
Keyword/Variable Description
aor The address of record to which the packet is being sent.This option is used to filter all packets being sent to a specific address of record or a group of AoRs. When specifying a group of addresses, the initial address is configured using this parameter. The range can then be configured using the wildcard parameter.
wildcard

This option is used in conjunction with the aor option to specify a group of addresses for which packets are to be filtered. The mask must be entered as a complement: Zero-bits in this parameter mean that the corresponding bits configured for the aor parameter must be identical. One-bits in this parameter mean that the corresponding bits configured for the aor parameter must be ignored.

IMPORTANT:

The mask must contain a contiguous set of one-bits from the least significant bit (LSB). Therefore, allowed masks are 0, 1, 3, 7, 15, 31, 63, 127, and 255. For example, acceptable wildcards are 0.0.0.3, 0.0.0.255, and 0.0.15.255. A wildcard of 0.0.7.15 is not acceptable since the one-bits are not contiguous.



Rule Order

A single ACL can consist of multiple rules. Each packet is compared against each of the ACL rules, in the order in which they were entered, until a match is found. Once a match is identified, all subsequent rules are ignored.

Additional rules can be added to an existing ACL and properly ordered using either of the following options:
  • Before
  • After
Using these placement options requires the specification of an existing rule in the ACL and the configuration of the new rule as demonstrated by the following flow:
[ before | after ] { <existing_rule> }
{ <new_rule> }

An example of an ACL is shown in the following section.

Viewing ACLs

ACLs can be viewed through the show configuration command executed from the context where the ACL resides. The following example was taken from the output of the show configuration context <name> command:

[test1]st40# show
configuration context test1
config
  context
test1
    subscriber
default
    exit
    radius
group default
    #exit
    cscf acl name acl1
      after permit criteria
source address 1.2.3.4
      after deny criteria
destination aor *.bad.com
      after permit criteria
source aor *@test.com
      after deny criteria
source address 0.0.0.255
      after deny criteria
source aor user@test.com
      #exit
    #exit
  end