Cisco ASA 5500 Series Configuration Guide using ASDM, 6.3
Configuring Access Rules
Downloads: This chapterpdf (PDF - 198.0KB) The complete bookPDF (PDF - 22.37MB) | Feedback

Configuring Access Rules

Table Of Contents

Configuring Access Rules

Information About Access Rules

General Information About Rules

Implicit Permits

Using Access Rules and EtherType Rules on the Same Interface

Rule Order

Implicit Deny

Inbound and Outbound Rules

Using Global Access Rules

Information About Access Rules

Access Rules for Returning Traffic

Allowing Broadcast and Multicast Traffic through the Transparent Firewall Using Access Rules

Management Access Rules

Information About EtherType Rules

Supported EtherTypes

Access Rules for Returning Traffic

Allowing MPLS

Licensing Requirements for Access Rules

Guidelines and Limitations

Default Settings

Configuring Access Rules

Adding an Access Rule  

Adding an EtherType Rule (Transparent Mode Only)

Add/Edit EtherType Rule

Configuring Management Access Rules    

Advanced Access Rule Configuration

Access Rule Explosion

Feature History for Access Rules


Configuring Access Rules


This chapter describes how to control network access through the adaptive security appliance using access rules, and it includes the following sections:

Information About Access Rules

Licensing Requirements for Access Rules

Guidelines and Limitations

Default Settings

Configuring Access Rules

Feature History for Access Rules


Note You use access rules to control network access in both routed and transparent firewall modes. In transparent mode, you can use both access rules (for Layer 3 traffic) and EtherType rules (for Layer 2 traffic).

To access the adaptive security appliance interface for management access, you do not also need an access rule allowing the host IP address. You only need to configure management access according to Chapter 33 "Configuring Management Access."


Information About Access Rules

Your access policy is made up of one or more access rules and/or EtherType rules per interface or globally for all interfaces.

You can use access rules in routed and transparent firewall mode to control IP traffic. An access rule permits or denies traffic based on the protocol, a source and destination IP address or network, and optionally the source and destination ports.

For transparent mode only, an EtherType rule controls network access for non-IP traffic. An EtherType rule permits or denies traffic based on the EtherType.

This section includes the following topics:

General Information About Rules

Information About Access Rules

Information About EtherType Rules

General Information About Rules

This section describes information for both access rules and EtherType rules, and it includes the following topics:

Implicit Permits

Using Access Rules and EtherType Rules on the Same Interface

Rule Order

Implicit Deny

Inbound and Outbound Rules

Using Global Access Rules

Implicit Permits

For routed mode, the following types of traffic are allowed through by default:

IPv4 traffic from a higher security interface to a lower security interface.

IPv6 traffic from a higher security interface to a lower security interface.

For transparent mode, the following types of traffic are allowed through by default:

IPv4 traffic from a higher security interface to a lower security interface.

IPv6 traffic from a higher security interface to a lower security interface.

ARPs in both directions.


Note ARP traffic can be controlled by ARP inspection, but cannot be controlled by an access rule.


BPDUs in both directions.

For other traffic, you need to use either an access rule (IPv4), an IPv6 access rule (IPv6), or an EtherType rule (non-IPv4/IPv6).

Using Access Rules and EtherType Rules on the Same Interface

You can apply both access rules and EtherType rules to each direction of an interface.

Rule Order

The order of rules is important. When the adaptive security appliance decides whether to forward or drop a packet, the adaptive security appliance tests the packet against each rule in the order in which the rules are listed. After a match is found, no more rules are checked. For example, if you create an access rule at the beginning that explicitly permits all traffic for an interface, no further rules are ever checked.

You can disable a rule by making it inactive.

Implicit Deny

Interface-specific access rules do not have an implicit deny at the end, but global rules on inbound traffic do have an implicit deny at the end of the list, so unless you explicitly permit it, traffic cannot pass. For example, if you want to allow all users to access a network through the adaptive security appliance except for particular addresses, then you need to deny the particular addresses and then permit all others.

For EtherType rules, the implicit deny does not affect IPv4 or IPv6 traffic or ARPs; for example, if you allow EtherType 8037 (the EtherType for IPX), the implicit deny at the end of the list does not block any IP traffic that you previously allowed with an access rule (or implicitly allowed from a high security interface to a low security interface). However, if you explicitly deny all traffic with an EtherType rule, then IP and ARP traffic is denied.

Inbound and Outbound Rules

The adaptive security appliance supports two types of access lists:

Inbound—Inbound access lists apply to traffic as it enters an interface.

Outbound—Outbound access lists apply to traffic as it exits an interface.


Note "Inbound" and "outbound" refer to the application of an access list on an interface, either to traffic entering the adaptive security appliance on an interface or traffic exiting the adaptive security appliance on an interface. These terms do not refer to the movement of traffic from a lower security interface to a higher security interface, commonly known as inbound, or from a higher to lower interface, commonly known as outbound.


An inbound access list can bind an access list to a specific interface or apply a global rule on all interfaces. For more information about global rules, see the "Using Global Access Rules" section.

An outbound access list is useful, for example, if you want to allow only certain hosts on the inside networks to access a web server on the outside network. Rather than creating multiple inbound access lists to restrict access, you can create a single outbound access list that allows only the specified hosts. (See Figure 31-1.) The outbound access list prevents any other hosts from reaching the outside network.

Figure 31-1 Outbound Access List

Using Global Access Rules

Global access rules allow you to apply a global rule to ingress traffic without the need to specify an interface to which the rule must be applied. Using global access rules provides the following benefits:

When migrating to the adaptive security appliance from a competitor appliance, you can maintain a global access rule policy instead of needing to apply an interface-specific policy on each interface.

Global access control policies are not replicated on each interface, so they save memory space.

Global access rules provides flexibility in defining a security policy. You do not need to specify which interface a packet comes in on, as long as it matches the source and destination IP addresses.

Global access rules use the same mtrie and stride tree as interface-specific access rules, so scalability and performance for global rules are the same as for interface-specific rules.

You can configure global access rules in conjunction with interface access rules, in which case, the specific interface access rules are always processed before the general global access rules.

Information About Access Rules

This section describes information about access rules and includes the following topics:

Access Rules for Returning Traffic

Allowing Broadcast and Multicast Traffic through the Transparent Firewall Using Access Rules

Management Access Rules

Access Rules for Returning Traffic

For TCP and UDP connections for both routed and transparent mode, you do not need an access rule to allow returning traffic because the adaptive security appliance allows all returning traffic for established, bidirectional connections.

For connectionless protocols such as ICMP, however, the adaptive security appliance establishes unidirectional sessions, so you either need access rules to allow ICMP in both directions (by applying access lists to the source and destination interfaces), or you need to enable the ICMP inspection engine. The ICMP inspection engine treats ICMP sessions as bidirectional connections.

Allowing Broadcast and Multicast Traffic through the Transparent Firewall Using Access Rules

In routed firewall mode, broadcast and multicast traffic is blocked even if you allow it in an access rule, including unsupported dynamic routing protocols and DHCP (unless you configure DHCP relay). Transparent firewall mode can allow any IP traffic through. This feature is especially useful in multiple context mode, which does not allow dynamic routing, for example.


Note Because these special types of traffic are connectionless, you need to apply an extended access list to both interfaces, so returning traffic is allowed through.


Table 31-1 lists common traffic types that you can allow through the transparent firewall.

Table 31-1 Transparent Firewall Special Traffic 

Traffic Type
Protocol or Port
Notes

DHCP

UDP ports 67 and 68

If you enable the DHCP server, then the adaptive security appliance does not pass DHCP packets.

EIGRP

Protocol 88

OSPF

Protocol 89

Multicast streams

The UDP ports vary depending on the application.

Multicast streams are always destined to a Class D address (224.0.0.0 to 239.x.x.x).

RIP (v1 or v2)

UDP port 520


Management Access Rules

You can configure access rules that control management traffic destined to the adaptive security appliance. Access control rules for to-the-box management traffic (such as HTTP, Telnet, and SSH) have higher precedence than an management access rule. Therefore, such permitted management traffic will be allowed to come in even if explicitly denied by the to-the-box access list.

Information About EtherType Rules

This section describes EtherType rules and includes the following topics:

Supported EtherTypes

Access Rules for Returning Traffic

Allowing MPLS

Supported EtherTypes

An EtherType rule controls any EtherType identified by a 16-bit hexadecimal number.

EtherType rules support Ethernet V2 frames.

802.3-formatted frames are not handled by the rule because they use a length field as opposed to a type field.

BPDUs, which are permitted by default, are the only exception: they are SNAP-encapsulated, and the adaptive security appliance is designed to specifically handle BPDUs.

The adaptive security appliance receives trunk port (Cisco proprietary) BPDUs. Trunk BPDUs have VLAN information inside the payload, so the adaptive security appliance modifies the payload with the outgoing VLAN if you allow BPDUs.

Access Rules for Returning Traffic

Because EtherTypes are connectionless, you need to apply the rule to both interfaces if you want traffic to pass in both directions.

Allowing MPLS

If you allow MPLS, ensure that Label Distribution Protocol and Tag Distribution Protocol TCP connections are established through the adaptive security appliance by configuring both MPLS routers connected to the adaptive security appliance to use the IP address on the adaptive security appliance interface as the router-id for LDP or TDP sessions. (LDP and TDP allow MPLS routers to negotiate the labels (addresses) used to forward packets.)

On Cisco IOS routers, enter the appropriate command for your protocol, LDP or TDP. The interface is the interface connected to the adaptive security appliance.

hostname(config)# mpls ldp router-id interface force
 
   

Or

hostname(config)# tag-switching tdp router-id interface force
 
   

Licensing Requirements for Access Rules

The following table shows the licensing requirements for this feature:

Model
License Requirement

All models

Base License.


Guidelines and Limitations

This section includes the guidelines and limitations for this feature.

Context Mode Guidelines

Supported in single and multiple context mode.

Firewall Mode Guidelines

Supported in routed and transparent firewall modes.

IPv6 Guidelines

Supports IPv6

Additional Guidelines and Limitations

To access the adaptive security appliance interface for management access, you do not need an access list allowing the host IP address. You only need to configure management access by following the instructions in Chapter 33 "Configuring Management Access."

Default Settings

See the "Implicit Permits" section.

Configuring Access Rules

This section includes the following topics:

Adding an Access Rule

Adding an EtherType Rule (Transparent Mode Only)

Configuring Management Access Rules

Adding an Access Rule  

To apply an access rule, perform the following steps.


Step 1 Choose Configuration > Firewall > Access Rules.

Step 2 Click Add, and choose one of the following options:

Add Access Rule

Add IPv6 Access Rule

The appropriate access rule dialog box appears.

Step 3 From the Interface drop-down list, choose the interface on which to apply the rule.

The management interface is for management only and cannot be used to configure an access rule.

Step 4 In the Action field, click one of the following radio buttons next to the desired action:

Permit—Permits access if the conditions are matched.

Deny—Denies access if the conditions are matched.

Step 5 In the Source field, enter an IP address that specifies the network, interface IP, or any address from which traffic is permitted or denied to the specified destination.

For more information about enabling IPv6 on an interface, see Chapter 8 "Configuring Interfaces."

Step 6 In the Destination field, enter an IP address that specifies the network, interface IP, or any address to which traffic is permitted or denied from the source specified in the Source field.

Step 7 Select the service type.

Step 8 (Optional) To add a time range to your access rule that specifies when traffic can be allowed or denied, click More Options to expand the list.

a. To the right of the Time Range drop down list, click the browse button.

The Browse Time Range dialog box appears.

b. Click Add.

The Add Time Range dialog box appears.

c. In the Time Range Name field, enter a time range name, with no spaces.

d. Choose the Start Time and the End Time.

e. To specify additional time constraints for the time range, such as specifying the days of the week or the recurring weekly interval in which the time range will be active, click Add, and choose the specifications.

f. Click OK to apply the optional time range specifications.

Step 9 (Optional) In the Description field, add a text description about the access rule.

The description can contain multiple lines; however, each line can be no more than 100 characters in length.

Step 10 (Optional) Logging is enabled by default. You can disable logging by unchecking the check box, or you can change the logging level from the drop-down list. The default logging level is Informational.

Step 11 Click OK. The access rule appears with the newly configured access rules.

Step 12 Click Apply to save the access rule to your configuration.


Note After you add access rules, you can click the following radio buttons to filter which access rules appear in the main pane: IPv4 and IPv6, IPv4 Only, or IPv6 Only.



Adding an EtherType Rule (Transparent Mode Only)

The EtherType Rules window shows access rules based on packet EtherTypes. EtherType rules are used to configure non-IP related traffic policies through the adaptive security appliance when operating in transparent mode. In transparent mode, you can apply both extended and EtherType access rules to an interface. EtherType rules take precedence over the extended access rules.

For more information about EtherType rules, see the "Information About Access Rules" section.

To add an EtherType rule, perform the following steps:


Step 1 Choose Configuration > Device Management > Management Access > EtherType Rules.

Step 2 Click Add.

The Add EtherType rules window appears.

Step 3 (Optional) To specify the placement of the new EtherType rule, select an existing rule, and click Insert... to add the EtherType rule before the selected rule, or click Insert After... to add the EtherType rle after the selected rule.

Step 4 From the Interface drop-down list, choose the interface on which to apply the rule

The management interface is for management only and cannot be used to configure an access rule.

Step 5 In the Action field, click one of the following radio buttons next to the desired action:

Permit—Permits access if the conditions are matched.

Deny—Denies access if the conditions are matched.

Step 6 In the EtherType field, choose an EtherType value from the drop-down list.

Step 7 (Optional) In the Description field, add a test description about the rule.

The description can contain multiple lines; however, each line can b no more than 100 characters in length.

Step 8 (Optional) To specify the direction for this rule, click More Options to expand the list, and then specify the direction by clicking one of the following radio buttons:

In—Incoming traffic

Out—Outgoing traffic

Step 9 Click OK.


Fields

Add—Adds a new EtherType rule. Choose the type of rule you want to add from the drop-down list.

Edit—Edits an EtherType rule.

Delete—Deletes an EtherType rule.

Move Up—Moves a rule up. Rules are assessed in the order they appear in this table, so the order can matter if you have overlapping rules.

Move Down—Moves a rule down.

Cut—Cuts a rule.

Copy—Copies the parameters of a rule so you can start a new rule with the same parameters using the Paste button.

Paste—Opens an Add/Edit Rule dialog box with the copied or cut parameters of the rule prefilled. You can then make any modifications and add it to the table. The Paste button adds the rule above the selected rule. The Paste After item, available from the Paste drop-down list, adds the rule after the selected rule.

The following description summarizes the columns in the EtherType Rules table. You can edit the contents of these columns by double-clicking on a table cell. Double-clicking on a column header sorts the table in ascending alphanumeric order, using the selected column as the sort key. If you right-click a rule, you see all of the options represented by the buttons above, as well as Insert and Insert After items. These items either insert a new rule before the selected rule (Insert) or after the selected rule (Insert After.)

No—Indicates the order of evaluation for the rule.

Action—Permit or deny action for this rule.

Ethervalue—EtherType value: IPX, BPDU, MPLS-Unicast, MPLS-Multicast, or a 16-bit hexadecimal value between 0x600 (1536) and 0xffff by which an EtherType can be identified.

Interface—Interface to which the rule is applied.

Direction Applied—Direction for this rule: incoming traffic or outgoing traffic.

Description—Optional text description of the rule.

Add/Edit EtherType Rule

The Add/Edit EtherType Rules dialog box lets you add or edit an EtherType rule.

For more information about EtherType rules, see the "Information About Access Rules" section.

Fields

Action—Permit or deny action for this rule.

Interface—Interface name for this rule.

Apply rule to—Direction for this rule: incoming traffic or outgoing traffic.

Ethervalue—EtherType value: BPDU, IPX, MPLS-Unicast, MPLS-Multicast, any (any value between 0x600 and 0xffff), or a 16-bit hexadecimal value between 0x600 (1536) and 0xffff by which an EtherType can be identified.

Description—Optional text description of the rule.

Configuring Management Access Rules    

Access Rules specifically permit or deny traffic to or from a particular peer (or peers), while Management Access Rules provide access control for to-the-box traffic. For example, in addition to detecting IKE Denial of Service attacks, you can block them using management access rules.

To add a Management Access Rule, perform the following steps:


Step 1 Choose Configuration > Device Management > Management Access > Management Access Rules.

Step 2 Click Add, and choose one of the following actions:

Add Management Access Rule

Add IPv6 Management Access Rule

The appropriate Add Management Access Rule dialog box appears.

Step 3 From the Interface drop-down list, choose an interface on which to apply the rule.

Step 4 In the Action field, click one of the following:

Permit (permits this traffic)

Deny (denies this traffic)

Step 5 In the Source field, choose Any, or click the ellipsis (...) to browse for an address.

Step 6 In the Service field, add a service name for rule traffic, or click the ellipsis (...) to browse for a service.

Step 7 (Optional) In the Description field, add a description for this management access rule.

Step 8 (Optional) If you want to receive log messages for this access rule, check Enable Logging, and then from the Logging Level drop-down list, choose the log level to apply. The default level is Informational.

Step 9 (Optional) To configure advanced options, click More Options to configure the following settings:

If you want to turn off this Management Access Rule, uncheck Enable Rule.

Add a source service in the Source Service field, or click the ellipsis (...) to browse for a service.

The destination service and source service must be the same. Copy and paste the destination Service field to the Source Service field.

To configure the logging interval (if you enable logging and choose a non-default setting), enter a value in seconds in the Logging Interval field.

To select a predefined time range for this rule, from the Time Range drop-down list, choose a time range; or click the ellipsis (...) to browse for a time range.

The Add Time Range dialog box appears. For information about adding a time range, see the "Configuring Time Ranges" section.

Step 10 Click OK. The dialog box closes and the Management Access rule is added.

Step 11 Click Apply. The rule is saved in the running configuration.


Note After you create management access rules, you can click the radio buttons at the bottom of the pane to sort the display and show both IPv4 and IPv6 rules, IPv4 only, or IPv6 only.



Advanced Access Rule Configuration

The Advanced Access Rule Configuration dialog box lets you set access rule logging options.

When you enable logging, if a packet matches the access rule, the adaptive security appliance creates a flow entry to track the number of packets received within a specific interval. The adaptive security appliance generates a system log message at the first hit and at the end of each interval, identifying the total number of hits during the interval and reporting the time of the last hit.


Note The adaptive security appliancepane displays the hit count information in the "last rule hit" row. To view the rule hit count and timestamp, choose Configuration > Firewall > Advanced > ACL Manager, and hover the mouse pointer over a cell in the ACL Manager table.


At the end of each interval, the adaptive security appliance resets the hit count to 0. If no packets match the access rule during an interval, the adaptive security appliance deletes the flow entry.

A large number of flows can exist concurrently at any point of time. To prevent unlimited consumption of memory and CPU resources, the adaptive security appliance places a limit on the number of concurrent deny flows; the limit is placed only on deny flows (and not permit flows) because they can indicate an attack. When the limit is reached, the adaptive security appliance does not create a new deny flow until the existing flows expire. If someone initiates a denial of service attack, the adaptive security appliance can create a very large number of deny flows in a very short period of time. Restricting the number of deny-flows prevents unlimited consumption of memory and CPU resources.

Prerequisites

These settings only apply if you enable the newer logging mechanism for the access rule.

Fields

Maximum Deny-flows—The maximum number of deny flows permitted before the adaptive security appliance stops logging, between 1 and the default value. The default is 4096.

Alert Interval—The amount of time (1-3600 seconds) between system log messages (number 106101) that identify that the maximum number of deny flows was reached. The default is 300 seconds.

Per User Override table—Specifies the state of the per user override feature. If the per user override feature is enabled on the inbound access rule, the access rule provided by a RADIUS server replaces the access rule configured on that interface. If the per user override feature is disabled, the access rule provided by the RADIUS server is combined with the access rule configured on that interface. If the inbound access rule is not configured for the interface, per user override cannot be configured.

Object Group Search Setting—Reduces the amount of memory used to store service rules, but lengthens the amount of time to search for a matching access rule.

Access Rule Explosion

The security appliance allows you to turn off the expansion of access rules that contain certain object groups. When expansion is turned off, an object group search is used for lookup, which lowers the memory requirements for storing expanded rules but decreases the lookup performance. Because of the trade-off of performance for memory utilization, you can turn on and turn off the search.

To configure the option of turning off the expansion of access rules that contain s, perform the following steps:


Step 1 Choose Configuration > Firewall > Access Rules.

Step 2 Click the Advanced button.

Step 3 Check the Enable Object Group Search Algorithm check box.


For more information about access rules, see the "Information About Access Rules" section.

Feature History for Access Rules

Table 31-2 lists each feature change and the platform release in which it was implemented. ASDM is backwards-compatible with multiple platform releases, so the specific ASDM release in which support was added is not listed.

Table 31-2 Feature History for Access Rules 

Feature Name
Platform Releases
Feature Information

Interface access rules.

7.0(1)

Controlling network access through the security appliance using access lists.

The following screen was introduced: Configuration > Firewall > Access Rules.

Global access rules.

8.3(1)

Global access rules were introduced.

The following screen was modified: Configuration > Firewall > Access Rules.