NAT commands are completely redesigned in Cisco ASA 8.3 release.
Monday, July 26th, 2010Although the 8.3 release of Cisco ASA contains many new firewall features, there are two significant changes that network engineers should be aware of. The first is the way NAT commands are specified; NAT configuration is now easier and flexible. This is a long overdue change and makes it significantly easier to maintain NAT policy containing hundreds of NAT rules. The second, moves the firewall engineers towards using real untranslated addresses in the filtering ACEs instead of addresses (mapped or real) as seen in the IP packets appearing at the ingress and egress interfaces of the firewall. This approach avoids the need to modify the filtering ACEs when there is a change in the mapped addresses.
For example,
static (dmz, outside) 12.12.12.12 192.168.1.12 netmask 255.255.255.255 access-list acl_outside extended permit tcp any host 12.12.12.12 eq https is specified in ASA 8.3 as object network website host 192.168.1.12 nat (dmz, outside) static 12.12.12.12 access-list acl_outside extended permit tcp any host 192.168.1.12 eq https
The firewall engineers are usually more familiar with the real IP addresses, handling change requests that come in to the network engineers often require figuring out the mapping from real IP address to mapped address, before investigating the ACEs using the mapped address and hence they might be more comfortable with using real IP addresses in the access-list entries.
So at the outset, this looks like a better approach; however this is a significant departure from how mapped addresses are used in filtering rules in not only prior Cisco versions but also other firewall vendors. Also this approach will not avoid changes to ACEs if the real address itself is changed. Configurations that are being migrated to the 8.3 release should be carefully analyzed to see if the polices are migrated properly and make sure that overly broad policies or narrow policies are not created when there is a one-to-many or many to many NAT mappings of unequal sizes. Also the cumulative impact of NAT and ACL rules should be taken in account during migration; broader ACEs used with very specific NAT rules and specific ACEs used with very broad NAT rules.
Here is how the new NAT redesign makes it easier to specify the NAT commands when compared to the prior versions:
Fewer NAT commands to deal with: Engineers can use a relatively small number of commands to accomplish what they want; they do not have to learn myriad NAT syntactic variations like Regular Dynamic NAT/PAT, Regular NAT policy, NAT Exemption, Identify NAT, Static NAT/PAT, Static Policy NAT, Outside NAT, Bidirectional/Twice NAT using multiple NAT statements etc.,. In the ASA 8.3 release, engineers need to learn about only a couple of syntactic constructs: Network Object NAT and Twice NAT to specify NAT. Using Network Object NAT, engineers can specify dynamic or static NAT on an individual real IP address. Using Twice NAT, engineers can define the desired address or service translation based on any combination of matching source, destination and service in a single rule for any ingress, egress interfaces.
Network object dynamic and static nat
object network name
nat [(real_ifc,mapped_ifc)] dynamic {mapped_inline_host_ip [interface] | mapped_obj
[interface] | interface} [dns]
object network name
nat [(real_ifc,mapped_ifc)] static {mapped_inline_ip | mapped_obj | interface}
{dns | service {tcp | udp} real_port mapped_port]
Twice NAT
nat [(real_ifc,mapped_ifc)] [line | {after-object [line]}] source dynamic {real_obj | any} {mapped_obj [interface] | interface} [destination static {mapped_obj | interface} {real_obj | any}] [service {mapped_dest_svc_obj real_dest_svc_obj}] [dns] [unidirectional] [inactive] [description desc]
nat [(real_ifc,mapped_ifc)] [line | {after-object [line]}] source static {real_obj | any} {mapped_obj | interface | any} [destination static {mapped_obj | interface} {real_obj | any}] [service {real_src_mapped_dest_svc_obj | any} mapped_src_real_dest_svc_obj][dns] [unidirectional] [inactive] [description desc]
Control over order of NAT commands: The order in which the commands were assessed in prior versions depended on the type of NAT used, and in some cases, the order in which the commands appeared in the configuration. If the engineer wanted to add a new rule at a desired location or modify the order, it was really difficult. This has been simplified in the ASA 8.3 release. The NAT table in the 8.3 release contains 3 sections assessed in the following order: section 1 contains the twice NAT rules based on the order in which these commands appear in the configuration. It is possible to insert a new NAT command at any position using the “line” option. Section 2 contains the automatic rules generated by Cisco using a fairly simple internal order from the Network Object NAT definitions. Section 3 contains twice NAT rules that are specifically inserted after section 2 using “after-object line” twice NAT command option. This is simple when compared to the pretty complex ordering that engineers need to understand in the ASA versions 8.2 and prior.
Twice NAT in a single NAT command: In the prior versions, users have to use multiple NAT commands to perform both source and destination translation for a given IP packet. This also means that users had to be aware of any unintended bidirectional NAT rules that are formed because various NAT commands defined with in the configuration could be combined. For example, 2 static NAT statements or a static with nat/global commands could combine to perform twice NAT. The user had to be mindful of what are the possible twice NAT rules and whether those are assessed in the right order he intended. With the 8.3 release, it is now possible to specify both source and destination translation for any source, destination and service in a single rule and define any number of them in the order they want.
Besides the NAT redesign, the 8.3 release provides the following additional firewall features:
Interface independent Access policies: You can now configure access rules that are applied globally, as well as access rules that are applied to an interface. If the configuration specifies both a global access policy and interface-specific access policies, the interface-specific policies are evaluated before the global policy. This is somewhat similar to the Global policies available in the Juniper NetScreen firewall.
Basic Network and Service Objects: You can now create named network objects that you can use in place of a host, a subnet, or a range of IP addresses in your configuration and named service objects that you can use in place of a protocol and port in your configuration. You can then change the object definition in one place, without having to change any other part of your configuration. This avoids the need to use the object-group even for simple network or service objects and brings this feature in line with other firewall vendors like Check Point and Juniper NetScreen.
To summarize, ASA release 8.3 provides simplified and flexible NAT specification making it easy to maintain large NAT configurations. For customers using Cisco infrastructure, ASA 8.3 release provides significant benefits when deploying brand new firewalls. However, the requirement to use real IP addresses in the access list statements is a significant architecture change and would complicate the migration effort when attempting to migrate NAT configurations from prior versions. The migration of NAT configurations should be performed with close attention to the gaps created by the Cisco ASA 8.3 migration tool.
Athena FirePAC from Athena Security offers a migration tool that performs offline policy analysis for understanding the interactions between ACL, NAT and routing rules. It is extremely useful when performing migrations between firewall versions or across vendor platforms. Despite the availability of vendor provided conversion tools, the most critical step in the process is validating that the policies were migrated correctly. Identifying where gaps were introduced so that they can be fixed is the primary benefit of Athena’s migration solution and it has proven to cut down the manual effort by at least 85%. To learn more, read about Athena’s Migration Tool.











