Nat Rule Order - Cisco ASA Series Configuration Manual

Firewall cli, asa services module, and the adaptive security virtual appliance
Hide thumbs Also See for ASA Series:
Table of Contents

Advertisement

Chapter 9
Network Address Translation (NAT)

NAT Rule Order

Network object NAT rules and twice NAT rules are stored in a single table that is divided into three
sections. Section 1 rules are applied first, then section 2, and finally section 3, until a match is found.
For example, if a match is found in section 1, sections 2 and 3 are not evaluated. The following table
shows the order of rules within each section.
Table 9-1
Table Section Rule Type
Section 1
Section 2
Section 3
For section 2 rules, for example, you have the following IP addresses defined within network objects:
NAT Rule Table
Twice NAT
Network object NAT If a match in section 1 is not found, section 2 rules are applied
Twice NAT
192.168.1.0/24 (static)
Order of Rules within the Section
Applied on a first match basis, in the order they appear in the
configuration. Because the first match is applied, you must
ensure that specific rules come before more general rules, or
the specific rules might not be applied as desired. By default,
twice NAT rules are added to section 1.
If you configure EasyVPN remote, the ASA
Note
dynamically adds invisible NAT rules to the end of this
section. Be sure that you do not configure a twice NAT
rule in this section that might match your VPN traffic,
instead of matching the invisible rule. If VPN does not
work due to NAT failure, consider adding twice NAT
rules to section 3 instead.
in the following order, as automatically determined by the
ASA:
Static rules.
1.
Dynamic rules.
2.
Within each rule type, the following ordering guidelines are
used:
Quantity of real IP addresses—From smallest to largest.
1.
For example, an object with one address will be assessed
before an object with 10 addresses.
For quantities that are the same, then the IP address number
2.
is used, from lowest to highest. For example, 10.1.1.0 is
assessed before 11.1.1.0.
3.
If the same IP address is used, then the name of the network
object is used, in alphabetical order. For example,
abracadabra is assessed before catwoman.
If a match is still not found, section 3 rules are applied on a first
match basis, in the order they appear in the configuration. This
section should contain your most general rules. You must also
ensure that any specific rules in this section come before
general rules that would otherwise apply. You can specify
whether to add a twice NAT rule to section 3 when you add the
rule.
Cisco ASA Series Firewall CLI Configuration Guide
NAT Basics
9-5

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents