<?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 DNS rewrite matching wrong NAT rule in General Topics</title>
    <link>https://live.paloaltonetworks.com/t5/general-topics/dns-rewrite-matching-wrong-nat-rule/m-p/292765#M77442</link>
    <description>&lt;P&gt;Think this needs a case.&amp;nbsp; Open to any suggested workarounds.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Connecting two overlapping networks with NAT.&amp;nbsp; (why? we have to)&lt;/P&gt;&lt;P&gt;192.168.1.0&amp;nbsp; (zone1) --&amp;nbsp; PA --&amp;nbsp; (zone2)&amp;nbsp; 192.168.1.0&lt;/P&gt;&lt;P&gt;policy routing in place, come in zone1 interface go out zone2 and vice versa&lt;/P&gt;&lt;P&gt;Doing network nats at a /24 in this example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I do two rules, natting the overlapping network to the same - ie symmetrical nat -&amp;nbsp; DNS rewrite works:&amp;nbsp;&lt;/P&gt;&lt;P&gt;src: 192.168.1.0/24 to 10.1.1.0 (zone2) - dest: 10.1.1.0/24 to 192.168.1.0/24 DNS rewrite - reverse&lt;/P&gt;&lt;P&gt;src: 192.168.1.0/24 to 10.1.1.0 (zone1) - dest: 10.1.1.0/24 to 192.168.1.0/24 DNS rewrite - reverse&lt;/P&gt;&lt;P&gt;both networks will 10.1.1.0 towards the firewall - firewall has policy routes.&lt;/P&gt;&lt;P&gt;All is good, dns requests get fixed up in either direction correctly.&lt;/P&gt;&lt;P&gt;traffic passes correctly&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I nat to a different network in each direction, then only the first hit matches, its as if the DNS rewrite is matching on first ip address match only and ignoring the zone.&amp;nbsp; &amp;nbsp;This fails to match on direction, and returns the wrong DNS rewrite entry for the second rule&lt;/P&gt;&lt;P&gt;src: 192.168.1.0/24 to 10.1.1.0 (zone2) - dest: 10.1.2.0/24 to 192.168.1.0/24 DNS rewrite - reverse&lt;/P&gt;&lt;P&gt;src: 192.168.1.0/24 to 10.1.2.0 (zone1) - dest: 10.1.1.0/24 to 192.168.1.0/24 DNS rewrite - reverse&lt;/P&gt;&lt;P&gt;zone1 network has a 10.1.1.0/24 route towards firewall&lt;/P&gt;&lt;P&gt;zone2 network has a 10.1.2.0/24 route towards the firewall&lt;/P&gt;&lt;P&gt;firewall runs policy routing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in this example, a server in Zone1 does a DNS request to a NS in Zone2, the response is correctly rewritten to 10.1.1.x&lt;/P&gt;&lt;P&gt;But in the other direction, the DNS answer should be 10.1.2.x but its getting matched on the NAT rule in the wrong direction&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I flip the order of the rules, the problem is that only the first destination nat is matching dns rewrite even though direction is wrong&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone else have this issue or know of a workaround - or why dns rewrite is not matching with zone context?&lt;/P&gt;</description>
    <pubDate>Mon, 14 Oct 2019 02:09:22 GMT</pubDate>
    <dc:creator>william.dolbow</dc:creator>
    <dc:date>2019-10-14T02:09:22Z</dc:date>
    <item>
      <title>DNS rewrite matching wrong NAT rule</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/dns-rewrite-matching-wrong-nat-rule/m-p/292765#M77442</link>
      <description>&lt;P&gt;Think this needs a case.&amp;nbsp; Open to any suggested workarounds.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Connecting two overlapping networks with NAT.&amp;nbsp; (why? we have to)&lt;/P&gt;&lt;P&gt;192.168.1.0&amp;nbsp; (zone1) --&amp;nbsp; PA --&amp;nbsp; (zone2)&amp;nbsp; 192.168.1.0&lt;/P&gt;&lt;P&gt;policy routing in place, come in zone1 interface go out zone2 and vice versa&lt;/P&gt;&lt;P&gt;Doing network nats at a /24 in this example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I do two rules, natting the overlapping network to the same - ie symmetrical nat -&amp;nbsp; DNS rewrite works:&amp;nbsp;&lt;/P&gt;&lt;P&gt;src: 192.168.1.0/24 to 10.1.1.0 (zone2) - dest: 10.1.1.0/24 to 192.168.1.0/24 DNS rewrite - reverse&lt;/P&gt;&lt;P&gt;src: 192.168.1.0/24 to 10.1.1.0 (zone1) - dest: 10.1.1.0/24 to 192.168.1.0/24 DNS rewrite - reverse&lt;/P&gt;&lt;P&gt;both networks will 10.1.1.0 towards the firewall - firewall has policy routes.&lt;/P&gt;&lt;P&gt;All is good, dns requests get fixed up in either direction correctly.&lt;/P&gt;&lt;P&gt;traffic passes correctly&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I nat to a different network in each direction, then only the first hit matches, its as if the DNS rewrite is matching on first ip address match only and ignoring the zone.&amp;nbsp; &amp;nbsp;This fails to match on direction, and returns the wrong DNS rewrite entry for the second rule&lt;/P&gt;&lt;P&gt;src: 192.168.1.0/24 to 10.1.1.0 (zone2) - dest: 10.1.2.0/24 to 192.168.1.0/24 DNS rewrite - reverse&lt;/P&gt;&lt;P&gt;src: 192.168.1.0/24 to 10.1.2.0 (zone1) - dest: 10.1.1.0/24 to 192.168.1.0/24 DNS rewrite - reverse&lt;/P&gt;&lt;P&gt;zone1 network has a 10.1.1.0/24 route towards firewall&lt;/P&gt;&lt;P&gt;zone2 network has a 10.1.2.0/24 route towards the firewall&lt;/P&gt;&lt;P&gt;firewall runs policy routing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in this example, a server in Zone1 does a DNS request to a NS in Zone2, the response is correctly rewritten to 10.1.1.x&lt;/P&gt;&lt;P&gt;But in the other direction, the DNS answer should be 10.1.2.x but its getting matched on the NAT rule in the wrong direction&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I flip the order of the rules, the problem is that only the first destination nat is matching dns rewrite even though direction is wrong&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone else have this issue or know of a workaround - or why dns rewrite is not matching with zone context?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 02:09:22 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/dns-rewrite-matching-wrong-nat-rule/m-p/292765#M77442</guid>
      <dc:creator>william.dolbow</dc:creator>
      <dc:date>2019-10-14T02:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: DNS rewrite matching wrong NAT rule</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/dns-rewrite-matching-wrong-nat-rule/m-p/292772#M77443</link>
      <description>&lt;P&gt;We are running 9.0.4&lt;/P&gt;&lt;P&gt;And&lt;/P&gt;&lt;P&gt;In the second scenario where the DNS rewrite does not work, the traffic passes fine.&amp;nbsp; It just that the NAT rules are smart enough to have zone context and it appears the DNS rewrite does not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 02:30:47 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/dns-rewrite-matching-wrong-nat-rule/m-p/292772#M77443</guid>
      <dc:creator>william.dolbow</dc:creator>
      <dc:date>2019-10-14T02:30:47Z</dc:date>
    </item>
  </channel>
</rss>

