<?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 Precedence of Routing\NAT\Policy in General Topics</title>
    <link>https://live.paloaltonetworks.com/t5/general-topics/precedence-of-routing-nat-policy/m-p/525630#M108701</link>
    <description>&lt;P&gt;Dear All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dear All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to know what is correct precedence among Routing\NAT\Security Policy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So If a packet hits on the outside zone of the Firewall then whether below process is correct?&lt;/P&gt;
&lt;P&gt;1. Whether FW has route for the destination\5.5.5.5 ( If YES)&lt;/P&gt;
&lt;P&gt;2. Whether there is any NAT policy&amp;nbsp; (If YES) ( Assume -&amp;gt; After NAT, 5.5.5.5 translated to 6.6.6.6)&lt;/P&gt;
&lt;P&gt;3. Then security policy should allow original destination IP(5.5.5.5)&amp;nbsp; or Translated&amp;nbsp; destination IP (6.6.6.6)&lt;/P&gt;</description>
    <pubDate>Tue, 03 Jan 2023 01:26:19 GMT</pubDate>
    <dc:creator>ManinderNegi</dc:creator>
    <dc:date>2023-01-03T01:26:19Z</dc:date>
    <item>
      <title>Precedence of Routing\NAT\Policy</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/precedence-of-routing-nat-policy/m-p/525630#M108701</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dear All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to know what is correct precedence among Routing\NAT\Security Policy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So If a packet hits on the outside zone of the Firewall then whether below process is correct?&lt;/P&gt;
&lt;P&gt;1. Whether FW has route for the destination\5.5.5.5 ( If YES)&lt;/P&gt;
&lt;P&gt;2. Whether there is any NAT policy&amp;nbsp; (If YES) ( Assume -&amp;gt; After NAT, 5.5.5.5 translated to 6.6.6.6)&lt;/P&gt;
&lt;P&gt;3. Then security policy should allow original destination IP(5.5.5.5)&amp;nbsp; or Translated&amp;nbsp; destination IP (6.6.6.6)&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 01:26:19 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/precedence-of-routing-nat-policy/m-p/525630#M108701</guid>
      <dc:creator>ManinderNegi</dc:creator>
      <dc:date>2023-01-03T01:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Precedence of Routing\NAT\Policy</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/precedence-of-routing-nat-policy/m-p/525632#M108702</link>
      <description>&lt;P&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/225514"&gt;@ManinderNegi&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Great question!&amp;nbsp; A good general rule is "Pre-NAT IP, post-NAT everything else."&amp;nbsp; For example, in this document -&amp;gt; &lt;A href="https://docs.paloaltonetworks.com/pan-os/10-1/pan-os-networking-admin/nat/nat-configuration-examples/destination-nat-exampleone-to-one-mapping," target="_blank"&gt;https://docs.paloaltonetworks.com/pan-os/10-1/pan-os-networking-admin/nat/nat-configuration-examples/destination-nat-exampleone-to-one-mapping,&lt;/A&gt; the IP in the security policy is pre-NAT, while the destination zone is post-NAT.&amp;nbsp; Scroll down to the bottom to see the NAT and security policy rules.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With regard to precedence, a good diagram is this one taken from the PCNSE study guide on Beacon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TomYoung_0-1672709765443.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/46589i3340C2F00A090B07/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TomYoung_0-1672709765443.png" alt="TomYoung_0-1672709765443.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of the order you mentioned, the route lookup is done 1st (Forwarding Lookup).&amp;nbsp; Then the NAT policy lookup is 2nd (DNAT check).&amp;nbsp; However, NAT is not applied to the packets until the egress interface (Forward Traffic).&amp;nbsp; The forwarding/NAT lookup is necessary to determine the destination zone.&amp;nbsp; Then the security policy is checked last.&amp;nbsp; That is why the IP address in the security policy is pre-NAT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 01:43:44 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/precedence-of-routing-nat-policy/m-p/525632#M108702</guid>
      <dc:creator>TomYoung</dc:creator>
      <dc:date>2023-01-03T01:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Precedence of Routing\NAT\Policy</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/precedence-of-routing-nat-policy/m-p/553201#M112503</link>
      <description>&lt;P&gt;Hi Tom&lt;/P&gt;
&lt;P&gt;Thanks for your explanation. I like to ask if the same applies for inbound traffic from Internet, e.g. DNAT 5.5.5.5 to 172.16.1.5. If the public IP subnet (e.g., 5.5.5.0/29) is not configured as an interface on the firewall, based on the flow with route lookup done first, the traffic should drop since the firewall would not have the public IP subnet in its routing table. Am I interpreting it correctly?&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 05:54:35 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/precedence-of-routing-nat-policy/m-p/553201#M112503</guid>
      <dc:creator>SimonLim</dc:creator>
      <dc:date>2023-08-10T05:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: Precedence of Routing\NAT\Policy</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/precedence-of-routing-nat-policy/m-p/553254#M112512</link>
      <description>&lt;P&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/184988"&gt;@SimonLim&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is correct.&amp;nbsp; Please refer to this article for the fix.&amp;nbsp; &lt;A href="https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000ClGZCA0" target="_blank"&gt;https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000ClGZCA0&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 12:56:35 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/precedence-of-routing-nat-policy/m-p/553254#M112512</guid>
      <dc:creator>TomYoung</dc:creator>
      <dc:date>2023-08-10T12:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Precedence of Routing\NAT\Policy</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/precedence-of-routing-nat-policy/m-p/553369#M112525</link>
      <description>&lt;P&gt;Hi Tom&lt;/P&gt;
&lt;P&gt;Thanks for the KB link. I was testing out this scenario for a customer who had experience Internet outage when an interface where their public ip subnet was a sub-interface failed. This matches perfectly with the KB and my understanding. However, in my setup, I was unable to replicate the customer's problem AND the result was opposite of the KB and the precedence as explained. It messed with my head.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have attached my setup and the results in here. I setup my lab to simulate customer's network when the interface (with the public ip subnet as sub-interface) was down, i.e. public ip subnet is not in the firewall's routing table (not even connected). SNAT and DNAT was working fine. SNAT for all outbound Internet was translated to 200.1.1.6 and DNAT for Inbound Internet to a server was translated from 200.1.1.2 to 172.22.22.22. I have only a static route on the router (ISP) referencing 200.1.1.0/29 with the firewall's external interface IP (110.99.99.1) as the next hop gateway. There is only default route from the firewall to the router (as shown). Besides the NAT rules, there are no traces of 200.1.1.x in other configurations. My PA is a 225 running 10.2.4.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Appreciate if you can review and see where I may have done wrong to have the opposite result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 02:22:21 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/precedence-of-routing-nat-policy/m-p/553369#M112525</guid>
      <dc:creator>SimonLim</dc:creator>
      <dc:date>2023-08-11T02:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Precedence of Routing\NAT\Policy</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/precedence-of-routing-nat-policy/m-p/553490#M112533</link>
      <description>&lt;P&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/184988"&gt;@SimonLim&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't see anything that you are doing wrong.&amp;nbsp; I may be missing something.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are a couple of docs that don't mention routes needed for source NAT pools that do not overlap with the outside interface.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000ClhwCAC" target="_blank"&gt;https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000ClhwCAC&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000ClOLCA0" target="_blank"&gt;https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000ClOLCA0&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wonder if your source NAT somehow allows the traffic not to be dropped?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Very interesting.&amp;nbsp; Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 13:25:02 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/precedence-of-routing-nat-policy/m-p/553490#M112533</guid>
      <dc:creator>TomYoung</dc:creator>
      <dc:date>2023-08-11T13:25:02Z</dc:date>
    </item>
  </channel>
</rss>

