<?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 Security policy zones after a source NAT in General Topics</title>
    <link>https://live.paloaltonetworks.com/t5/general-topics/security-policy-zones-after-a-source-nat/m-p/168082#M53604</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm migrating my security policy from a netscreen firewall to a Palo Alto firewall. I used the migration tool and I'm currently reviewing the NAT rules, and I'm getting a bit confused about security zones after NAT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- I have 3 interfaces : Trust, Unstrust, DMZ.&lt;/P&gt;&lt;P&gt;- I have a public IP range, that has nothing to do with the Untrust interface. My Untrust interface is 1.1.1.1, and my public IP range is 2.2.2.0/24.&lt;/P&gt;&lt;P&gt;- 2.2.2.0/24 is &lt;U&gt;routed to Trust interface&lt;/U&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Now I have a server in DMZ, with IP 192.168.1.9 with the gateway 192.168.1.1 (DMZ interface)&lt;/P&gt;&lt;P&gt;- So I have a NAT from DMZ (adress 192.168.1.9) to Untrust &amp;nbsp;(any) that translates the source IP into 2.2.2.9.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;==&amp;gt; The question is to know the source zone for my security policy&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;is it DMZ or is it Trust ? Is&amp;nbsp;the reverse route evaluated after source NAT ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;solution 1&lt;/U&gt;: from DMZ to Untrust&lt;/P&gt;&lt;P&gt;In the "understanding and configuring NAT" tech note from Palo Alto, the life of a packet diagram says to re-evaluate the route lookup after the NAT in case of translation on a &lt;STRONG&gt;destination&lt;/STRONG&gt; address, so the destination zone is re-evaluated for the security policy. But in case of source address translation, it says to go directly to security policy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;solution 2:&lt;/U&gt; from Trust to Untrust&lt;/P&gt;&lt;P&gt;On the other hand, this link says the following :&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.paloaltonetworks.com/documentation/61/pan-os/pan-os/networking/nat.html" target="_blank"&gt;https://www.paloaltonetworks.com/documentation/61/pan-os/pan-os/networking/nat.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Upon ingress, the firewall inspects the packet and does a route lookup to determine the egress interface and zone. Then the firewall determines if the packet matches one of the NAT rules that have been defined, based on source and/or destination zone. &lt;STRONG&gt;It then evaluates and applies any security policies that match the packet based on the original (pre-NAT) source and destination addresses, but the post-NAT &lt;U&gt;zones&lt;/U&gt;&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;See, zones is plural here, so are both routes for source and destination re-evaluated ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have an example like mine in production environment?&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jul 2017 12:43:12 GMT</pubDate>
    <dc:creator>LCMember4380</dc:creator>
    <dc:date>2017-07-25T12:43:12Z</dc:date>
    <item>
      <title>Security policy zones after a source NAT</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/security-policy-zones-after-a-source-nat/m-p/168082#M53604</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm migrating my security policy from a netscreen firewall to a Palo Alto firewall. I used the migration tool and I'm currently reviewing the NAT rules, and I'm getting a bit confused about security zones after NAT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- I have 3 interfaces : Trust, Unstrust, DMZ.&lt;/P&gt;&lt;P&gt;- I have a public IP range, that has nothing to do with the Untrust interface. My Untrust interface is 1.1.1.1, and my public IP range is 2.2.2.0/24.&lt;/P&gt;&lt;P&gt;- 2.2.2.0/24 is &lt;U&gt;routed to Trust interface&lt;/U&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Now I have a server in DMZ, with IP 192.168.1.9 with the gateway 192.168.1.1 (DMZ interface)&lt;/P&gt;&lt;P&gt;- So I have a NAT from DMZ (adress 192.168.1.9) to Untrust &amp;nbsp;(any) that translates the source IP into 2.2.2.9.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;==&amp;gt; The question is to know the source zone for my security policy&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;is it DMZ or is it Trust ? Is&amp;nbsp;the reverse route evaluated after source NAT ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;solution 1&lt;/U&gt;: from DMZ to Untrust&lt;/P&gt;&lt;P&gt;In the "understanding and configuring NAT" tech note from Palo Alto, the life of a packet diagram says to re-evaluate the route lookup after the NAT in case of translation on a &lt;STRONG&gt;destination&lt;/STRONG&gt; address, so the destination zone is re-evaluated for the security policy. But in case of source address translation, it says to go directly to security policy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;solution 2:&lt;/U&gt; from Trust to Untrust&lt;/P&gt;&lt;P&gt;On the other hand, this link says the following :&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.paloaltonetworks.com/documentation/61/pan-os/pan-os/networking/nat.html" target="_blank"&gt;https://www.paloaltonetworks.com/documentation/61/pan-os/pan-os/networking/nat.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Upon ingress, the firewall inspects the packet and does a route lookup to determine the egress interface and zone. Then the firewall determines if the packet matches one of the NAT rules that have been defined, based on source and/or destination zone. &lt;STRONG&gt;It then evaluates and applies any security policies that match the packet based on the original (pre-NAT) source and destination addresses, but the post-NAT &lt;U&gt;zones&lt;/U&gt;&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;See, zones is plural here, so are both routes for source and destination re-evaluated ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have an example like mine in production environment?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 12:43:12 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/security-policy-zones-after-a-source-nat/m-p/168082#M53604</guid>
      <dc:creator>LCMember4380</dc:creator>
      <dc:date>2017-07-25T12:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Security policy zones after a source NAT</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/security-policy-zones-after-a-source-nat/m-p/168101#M53610</link>
      <description>&lt;P&gt;Palo first checks if traffic flows on permitted ip/port.&lt;/P&gt;&lt;P&gt;Then identifies application.&lt;/P&gt;&lt;P&gt;Then does threat.&lt;/P&gt;&lt;P&gt;And if traffic passes all checks then IP is changed in the packet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Every interface belongs to zone.&lt;/P&gt;&lt;P&gt;If traffic enters firewall it comes from zone and SOURCE ZONE NEVER CHANGES.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now if it is SNAT (traffic that comes from DMZ to Untrust) then in NAT policy source zone is DMZ and destination zone is Untrust. Same in security policy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Different story is with DNAT if traffic comes from Untrust and goes to DMZ.&lt;/P&gt;&lt;P&gt;Traffic comes from Untrust zone because it enters firewall from interface that is in Untrust zone.&lt;/P&gt;&lt;P&gt;Now as traffic is destined to your public IP that according to routing table is in Untrust zone your NAT zones are:&lt;/P&gt;&lt;P&gt;Untrust &amp;gt; Untrust and from any source IP to your wan IP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NAT is evaluated and destination zone is changed in packet metadata BUT NOT DESTINATION IP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Security policy is checked when IP is still destined to original public IP so zone config matches correct destination zone:&lt;/P&gt;&lt;P&gt;Untrust &amp;gt; DMZ but IP is still wan IP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 14:24:44 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/security-policy-zones-after-a-source-nat/m-p/168101#M53610</guid>
      <dc:creator>Raido_Rattameister</dc:creator>
      <dc:date>2017-07-25T14:24:44Z</dc:date>
    </item>
  </channel>
</rss>

