<?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: How to tell which NAT rules will be the winner? in Firewall and Security Management</title>
    <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/How-to-tell-which-NAT-rules-will-be-the-winner/m-p/178070#M32634</link>
    <description>&lt;P&gt;Thanks Nik,&lt;/P&gt;&lt;P&gt;There are two type of users in this scenario:&lt;/P&gt;&lt;P&gt;User A: need to access 8.8.8.1-7 over the normal internet and their address is NAT'd into 125.125.125.1&lt;/P&gt;&lt;P&gt;User B: need to access only 8.8.8.8 over the GRE tunnel and their address must NOT NAT'd.&lt;/P&gt;&lt;P&gt;These users are both connected to same source range say 10.160.0.0/12 range.&lt;/P&gt;&lt;P&gt;User A never needs to access 8.8.8.8 but 8.8.8.1-7, but User B only needs to access 8.8.8.8.&lt;/P&gt;&lt;P&gt;I made destination address more specific for Rule 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I place Rule 2 above Rule 1, will this then work ?&lt;/P&gt;&lt;P&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Apr 2023 08:33:11 GMT</pubDate>
    <dc:creator>brian1027</dc:creator>
    <dc:date>2023-04-14T08:33:11Z</dc:date>
    <item>
      <title>How to tell which NAT rules will be the winner?</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/How-to-tell-which-NAT-rules-will-be-the-winner/m-p/178065#M32630</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We have a couple of checkpoint fwls (R81.10) active-standby mode.&lt;/P&gt;&lt;P&gt;I am trying to apply a NAT rule but it is bit difficult for me to test prior to applying it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a existing NAT rule as below as an example:&lt;/P&gt;&lt;P&gt;Rule 1: Org Source: 10.160.0.0/12, 10.0.0.0/8&amp;nbsp; &amp;nbsp;Org Destination: 8.8.8.0/24&amp;nbsp; Original Service: Any&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Translated source: 125.125.125.1&amp;nbsp; Translated destination: original&amp;nbsp; translated service: original&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is when we create another NO-NAT rule below Rule 1 as below, would this be picked up by Rule 2 instead of Rule 1 ?&lt;/P&gt;&lt;P&gt;Rule 2: Org source: 10.160.0.0/23, 10.0.0.0/8&amp;nbsp; Org Destination: 8.8.8.8&amp;nbsp; Original service: HTTP&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Translated Source: original&amp;nbsp; &amp;nbsp;Translated Destination: original&amp;nbsp; Translated service: HTTP&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have some users who need to access 8.8.8.8 in HTTP (tcp 80) over a GRE tunnel without being NAT'd by checkpoint.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the Rule 2 is not picked, what is the criteria that checkpoint use to select the right NAT rules?&lt;/P&gt;&lt;P&gt;In this case, Original Sources can't be more specific because two different type of users are connected to the same network. But I can make Destination address more specific (/32 address) and specific service (tcp 80).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 08:06:17 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/How-to-tell-which-NAT-rules-will-be-the-winner/m-p/178065#M32630</guid>
      <dc:creator>brian1027</dc:creator>
      <dc:date>2023-04-14T08:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to tell which NAT rules will be the winner?</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/How-to-tell-which-NAT-rules-will-be-the-winner/m-p/178067#M32632</link>
      <description>&lt;P&gt;The NAT rulebase is worked through top down, and the first match will be applied. So your NO-NAT rule should probably be above your NAT rule. It does not work like IP routing, where the most specific match is used.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 08:24:10 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/How-to-tell-which-NAT-rules-will-be-the-winner/m-p/178067#M32632</guid>
      <dc:creator>Nik_Bloemers</dc:creator>
      <dc:date>2023-04-14T08:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to tell which NAT rules will be the winner?</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/How-to-tell-which-NAT-rules-will-be-the-winner/m-p/178070#M32634</link>
      <description>&lt;P&gt;Thanks Nik,&lt;/P&gt;&lt;P&gt;There are two type of users in this scenario:&lt;/P&gt;&lt;P&gt;User A: need to access 8.8.8.1-7 over the normal internet and their address is NAT'd into 125.125.125.1&lt;/P&gt;&lt;P&gt;User B: need to access only 8.8.8.8 over the GRE tunnel and their address must NOT NAT'd.&lt;/P&gt;&lt;P&gt;These users are both connected to same source range say 10.160.0.0/12 range.&lt;/P&gt;&lt;P&gt;User A never needs to access 8.8.8.8 but 8.8.8.1-7, but User B only needs to access 8.8.8.8.&lt;/P&gt;&lt;P&gt;I made destination address more specific for Rule 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I place Rule 2 above Rule 1, will this then work ?&lt;/P&gt;&lt;P&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 08:33:11 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/How-to-tell-which-NAT-rules-will-be-the-winner/m-p/178070#M32634</guid>
      <dc:creator>brian1027</dc:creator>
      <dc:date>2023-04-14T08:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to tell which NAT rules will be the winner?</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/How-to-tell-which-NAT-rules-will-be-the-winner/m-p/178074#M32635</link>
      <description>&lt;P&gt;Yes, that should work. The NO NAT rule (which would be rule #1) shall then only be hit for 8.8.8.8, for the other 8.8.8.x IP addresses it will continue to look through the NAT rulebase and hit the second rule.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 09:53:15 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/How-to-tell-which-NAT-rules-will-be-the-winner/m-p/178074#M32635</guid>
      <dc:creator>Nik_Bloemers</dc:creator>
      <dc:date>2023-04-14T09:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to tell which NAT rules will be the winner?</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/How-to-tell-which-NAT-rules-will-be-the-winner/m-p/178079#M32637</link>
      <description>&lt;P&gt;Makes perfect sense!&lt;/P&gt;&lt;P&gt;Much appreciated Nik&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 10:28:43 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/How-to-tell-which-NAT-rules-will-be-the-winner/m-p/178079#M32637</guid>
      <dc:creator>brian1027</dc:creator>
      <dc:date>2023-04-14T10:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to tell which NAT rules will be the winner?</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/How-to-tell-which-NAT-rules-will-be-the-winner/m-p/178113#M32647</link>
      <description>&lt;P&gt;Just to further clarify that for the top section of the NAT policy consisting of Manual NAT rules, it is indeed top-down first fit.&amp;nbsp; Just like in the old Highlander movies: "There can be only one!".&amp;nbsp; One and only one manual NAT rule can be matched there (first fit).&lt;/P&gt;
&lt;P&gt;However if no manual NAT rules are matched in that top section the evaluation continues into the Automatic NAT rule section, at that point it is still top-down but not quite first fit.&amp;nbsp; Suppose that no top manual rules are matched, and an Automatic rule is found matching the source IP for a NAT operation.&amp;nbsp; If the NAT global property "Allow bi-directional NAT" is set (the default), evaluation will continue through the rest of the Automatic section looking for another NAT rule matching the destination IP.&amp;nbsp; If one is found two NAT rules have now been matched (sometimes called "dual NAT"), and the second matching NAT rule is shown in the log card as "NAT Additional Rule".&amp;nbsp; But only one Automatic rule can match the source, and another match the destination; for example you can't have more than one NAT rule match the source, it just takes the first one.&lt;/P&gt;
&lt;P&gt;Also be aware that there are two levels of caching present in an attempt to avoid full-fledged NAT rulebase lookups in F2F/slowpath, which can be quite costly with thousands of NAT rules.&amp;nbsp; This caching process is mostly transparent but good to be aware of.&amp;nbsp; The Level 1 cache is SecureXL NAT templates, and the Level 2 cache is a state table called fwx_cache.&amp;nbsp; If we don't get a hit in either of those generated from prior NAT rulebase lookups, we start a full NAT rulebase lookup.&amp;nbsp; The Hit Counts added in R81 for NAT rules have been reported to be wildly inconsistent, and I suspect this is due to L1/L2 NAT cache hits not incrementing the NAT rule hit counters, which I assume only happens during a full NAT rulebase lookup.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 16:37:32 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/How-to-tell-which-NAT-rules-will-be-the-winner/m-p/178113#M32647</guid>
      <dc:creator>Timothy_Hall</dc:creator>
      <dc:date>2023-04-14T16:37:32Z</dc:date>
    </item>
  </channel>
</rss>

