<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ASA 8.4 NAT order question in Network Security</title>
    <link>https://community.cisco.com/t5/network-security/asa-8-4-nat-order-question/m-p/2148059#M360715</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generally you should consider the following things with regarding NAT in 8.3 and newer software&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;NAT is broken into 3 sections on the ASA &lt;UL&gt;&lt;LI&gt;Section 1 consists of Twice NAT configurations (also called Manual NAT)&lt;/LI&gt;&lt;LI&gt;Section 2 consists of NAT configurations configured under "object network"&lt;/LI&gt;&lt;LI&gt;Section 3 consists of Twice NAT (also called Manual NAT) configurations that have been moved to the last section with the parameter "after-auto" (configured right after the source and destination interface)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;NAT has "line numbers" just like ACLs for Section 1 and Section 3 NAT configurations&amp;nbsp; &lt;UL&gt;&lt;LI&gt;Adding a new Twice NAT rule with a line number (right after source,destination interface) will move the existing rule and any after that 1 line number down. Without line number its added at the bottom (and might not apply)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;NAT configured with "object network" doesnt not use "line numbers". Instead their use is based on how specific the rule is and the decision of the ASA what rule to use might be even as specific as the the alphabetic order of the "object network" names is&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest reading the following section of the Configuration Guide for your software. (And any related sections). They give some nice addiotional information about the NAT operations&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.cisco.com/en/US/docs/security/asa/asa84/configuration/guide/nat_overview.html#wp1118157" rel="nofollow"&gt;http://www.cisco.com/en/US/docs/security/asa/asa84/configuration/guide/nat_overview.html#wp1118157&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now lets take this example situation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;You have alot of networks that fall into the whole 10.0.0.0/8 network&lt;/LI&gt;&lt;LI&gt;You want to give own NAT rules for some 10.x.x.x/yy subnets&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The "catch all" Default PAT rule&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;object-group network DEFAULT-PAT-SOURCE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; network-object 10.0.0.0 255.0.0.0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;nat (inside,outside) after-auto source dynamic DEFAULT-PAT-SOURCE interface&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;DEFAULT-PAT-SOURCE&lt;/STRONG&gt; = Is the "object-group" that defines the networks that are used for this PAT configurations&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;after-auto&lt;/STRONG&gt; = Moves this NAT rule to the last Section 3 (as mentioned in the start of the post, it should be a default rule if nothing else is configured)&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;interface&lt;/STRONG&gt; = Is the parameter that will define that the destination interface of the NAT (outside) is used as PAT address&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if we want to create a more specific rule in the Section 3 we could do the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;object-group network SPECIAL-PAT-SOURCE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; network-object 10.10.10.0 255.255.255.0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;object network PAT-ADDRESS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; host 1.1.1.1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;nat (inside,outside) 1 after-auto source dynamic SPECIAL-PAT-SOURCE PAT-ADDRESS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;SPECIAL-PAT-SOURCE&lt;/STRONG&gt; = Again defines the source addresses/networks for the NAT/PAT&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;PAT-ADDRESS&lt;/STRONG&gt; = Is used to define the new Public IP address since we can use the "interface" parameter (we want another IP address)&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;"1"&lt;/STRONG&gt; = This is the crucial point. It moves the new NAT rule in Section 3 NAT rules to the top. Taking the place of the NAT configuration we configured first. Hence the new rule will be hit first and all remanining 10-networks will hit the default PAT rule that is now on line number "2"&amp;nbsp; &lt;UL&gt;&lt;LI&gt;Notice that the line numbers dont show in the CLI format of the configuration when using "show run nat". They only show on the CLI with "show nat" which doesnt really give a clear output&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example show command output from my ASA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASA(config)# sh run nat&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;No NAT rule numbering&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;nat (LAN,WAN) after-auto source dynamic LAN-NETWORK interface&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;nat (WLAN,WAN) after-auto source dynamic WLAN-NETWORK interface&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASA(config)# show nat&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Order of NAT configurations mentioned (and also the Section number)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Manual NAT Policies (Section 3)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1 (LAN) to (WAN) source dynamic LAN-NETWORK interface&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; translate_hits = 0, untranslate_hits = 0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2 (WLAN) to (WAN) source dynamic WLAN-NETWORK interface&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; translate_hits = 0, untranslate_hits = 0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hitcounts are 0 because I remotely reloaded the ASA earlier today and there are no hosts turned on behind it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above is not the only options naturally but its based on the way I configure NAT.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Section 1 (Manual NAT):&lt;/STRONG&gt; Special NAT setups (VPN, possible partner DMZ connections etc)&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Section 2 (Object NAT):&lt;/STRONG&gt; Static NAT and Port Forward configurations (Static PAT)&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Section 3 (Manual NAT):&lt;/STRONG&gt; Default NAT/PAT rules for majority of the traffic through the ASA&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully this answered your questions. &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.cisco.com/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt; Please rate or mark the question as answered if so. Naturally ask more if you need some clarifications or need to ask something more&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Jouni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Mar 2013 15:06:54 GMT</pubDate>
    <dc:creator>Jouni Forss</dc:creator>
    <dc:date>2013-03-06T15:06:54Z</dc:date>
    <item>
      <title>ASA 8.4 NAT order question</title>
      <link>https://community.cisco.com/t5/network-security/asa-8-4-nat-order-question/m-p/2148058#M360713</link>
      <description>&lt;P&gt;In pre-8.3, NAT had a group number to match nat to global.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I do this in 8.4?&amp;nbsp; I need a default pat (0.0.0.0), but I also have specific pat for certain subnets.&amp;nbsp; How do I keep them from overlapping?&amp;nbsp; Will it check more specific nat statements first before it gets to more generic any any or 0.0.0.0?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2019 01:10:27 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/asa-8-4-nat-order-question/m-p/2148058#M360713</guid>
      <dc:creator>jason.williams</dc:creator>
      <dc:date>2019-03-12T01:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: ASA 8.4 NAT order question</title>
      <link>https://community.cisco.com/t5/network-security/asa-8-4-nat-order-question/m-p/2148059#M360715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generally you should consider the following things with regarding NAT in 8.3 and newer software&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;NAT is broken into 3 sections on the ASA &lt;UL&gt;&lt;LI&gt;Section 1 consists of Twice NAT configurations (also called Manual NAT)&lt;/LI&gt;&lt;LI&gt;Section 2 consists of NAT configurations configured under "object network"&lt;/LI&gt;&lt;LI&gt;Section 3 consists of Twice NAT (also called Manual NAT) configurations that have been moved to the last section with the parameter "after-auto" (configured right after the source and destination interface)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;NAT has "line numbers" just like ACLs for Section 1 and Section 3 NAT configurations&amp;nbsp; &lt;UL&gt;&lt;LI&gt;Adding a new Twice NAT rule with a line number (right after source,destination interface) will move the existing rule and any after that 1 line number down. Without line number its added at the bottom (and might not apply)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;NAT configured with "object network" doesnt not use "line numbers". Instead their use is based on how specific the rule is and the decision of the ASA what rule to use might be even as specific as the the alphabetic order of the "object network" names is&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest reading the following section of the Configuration Guide for your software. (And any related sections). They give some nice addiotional information about the NAT operations&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.cisco.com/en/US/docs/security/asa/asa84/configuration/guide/nat_overview.html#wp1118157" rel="nofollow"&gt;http://www.cisco.com/en/US/docs/security/asa/asa84/configuration/guide/nat_overview.html#wp1118157&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now lets take this example situation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;You have alot of networks that fall into the whole 10.0.0.0/8 network&lt;/LI&gt;&lt;LI&gt;You want to give own NAT rules for some 10.x.x.x/yy subnets&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The "catch all" Default PAT rule&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;object-group network DEFAULT-PAT-SOURCE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; network-object 10.0.0.0 255.0.0.0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;nat (inside,outside) after-auto source dynamic DEFAULT-PAT-SOURCE interface&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;DEFAULT-PAT-SOURCE&lt;/STRONG&gt; = Is the "object-group" that defines the networks that are used for this PAT configurations&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;after-auto&lt;/STRONG&gt; = Moves this NAT rule to the last Section 3 (as mentioned in the start of the post, it should be a default rule if nothing else is configured)&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;interface&lt;/STRONG&gt; = Is the parameter that will define that the destination interface of the NAT (outside) is used as PAT address&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if we want to create a more specific rule in the Section 3 we could do the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;object-group network SPECIAL-PAT-SOURCE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; network-object 10.10.10.0 255.255.255.0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;object network PAT-ADDRESS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; host 1.1.1.1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;nat (inside,outside) 1 after-auto source dynamic SPECIAL-PAT-SOURCE PAT-ADDRESS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;SPECIAL-PAT-SOURCE&lt;/STRONG&gt; = Again defines the source addresses/networks for the NAT/PAT&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;PAT-ADDRESS&lt;/STRONG&gt; = Is used to define the new Public IP address since we can use the "interface" parameter (we want another IP address)&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;"1"&lt;/STRONG&gt; = This is the crucial point. It moves the new NAT rule in Section 3 NAT rules to the top. Taking the place of the NAT configuration we configured first. Hence the new rule will be hit first and all remanining 10-networks will hit the default PAT rule that is now on line number "2"&amp;nbsp; &lt;UL&gt;&lt;LI&gt;Notice that the line numbers dont show in the CLI format of the configuration when using "show run nat". They only show on the CLI with "show nat" which doesnt really give a clear output&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example show command output from my ASA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASA(config)# sh run nat&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;No NAT rule numbering&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;nat (LAN,WAN) after-auto source dynamic LAN-NETWORK interface&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;nat (WLAN,WAN) after-auto source dynamic WLAN-NETWORK interface&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASA(config)# show nat&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Order of NAT configurations mentioned (and also the Section number)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Manual NAT Policies (Section 3)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1 (LAN) to (WAN) source dynamic LAN-NETWORK interface&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; translate_hits = 0, untranslate_hits = 0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2 (WLAN) to (WAN) source dynamic WLAN-NETWORK interface&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; translate_hits = 0, untranslate_hits = 0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hitcounts are 0 because I remotely reloaded the ASA earlier today and there are no hosts turned on behind it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above is not the only options naturally but its based on the way I configure NAT.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Section 1 (Manual NAT):&lt;/STRONG&gt; Special NAT setups (VPN, possible partner DMZ connections etc)&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Section 2 (Object NAT):&lt;/STRONG&gt; Static NAT and Port Forward configurations (Static PAT)&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Section 3 (Manual NAT):&lt;/STRONG&gt; Default NAT/PAT rules for majority of the traffic through the ASA&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully this answered your questions. &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.cisco.com/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt; Please rate or mark the question as answered if so. Naturally ask more if you need some clarifications or need to ask something more&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Jouni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2013 15:06:54 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/asa-8-4-nat-order-question/m-p/2148059#M360715</guid>
      <dc:creator>Jouni Forss</dc:creator>
      <dc:date>2013-03-06T15:06:54Z</dc:date>
    </item>
  </channel>
</rss>

