<?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: Connection table Confusion in Firewall and Security Management</title>
    <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Connection-table-Confusion/m-p/154024#M26006</link>
    <description>&lt;P&gt;Does rebooting a clusterXL member equate to also clearing its connection table?&amp;nbsp; &amp;nbsp;Or is the connections table just replicated on each member?&amp;nbsp; &amp;nbsp;If it is replicated, does clearing the connections table on one member clear it for all members?&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jul 2022 20:14:49 GMT</pubDate>
    <dc:creator>Daniel_Kavan</dc:creator>
    <dc:date>2022-07-27T20:14:49Z</dc:date>
    <item>
      <title>Connection table Confusion</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Connection-table-Confusion/m-p/151136#M24626</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like I was telling in the other thread&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://community.checkpoint.com/t5/Security-Gateways/Cluster-Capacity-peak-concurrent-connections/m-p/150157" target="_self"&gt;Cluster Capacity - peak/concurrent connections&lt;/A&gt; we're facing some HUGE connections from time to time, and I'm in the process of identifying them.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So I worked a script, that gets triggered when the connection is HIGH - goes over the 150K that we defined as trigger.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[Expert@XxXx-FW01:0]# fw ctl pstat | grep Concurrent | awk '{print $3}'&lt;BR /&gt;&lt;STRONG&gt;97807&lt;/STRONG&gt;&lt;BR /&gt;[Expert@XxXx-FW01:0]#&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now, when this gets triggered, we collect some reports, like the TOP x Sources HIT and TOP x Destinations HIT and from those TOP X, we're getting some additional reports on the first 3 IP's from each, in order to see what HUGE traffic happens against our appliances.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now on the connections table, we currently use "fw&amp;nbsp;tab -u -t connections -f" to get all sessions, but one of the problems is that this export and parse takes approx. 3-5 min or more. So I researched and ended up with "fw ctl conntab" that some state is better to use - as is more Human Readable format - and wayyy faster (under 30sec).&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&lt;P&gt;[Expert@XxXx-FW01:0]#time (fw tab -u -t connections -f &amp;gt; fwtab.log )&lt;BR /&gt;Using cptfmt&lt;BR /&gt;Formatting table's data - this might take a while...&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;real 3m7.821s&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;user 2m22.628s&lt;BR /&gt;sys 0m7.075s&lt;BR /&gt;[Expert@XxXx-FW01:0]#&lt;BR /&gt;[Expert@XxXx-FW01:0]# wc -l fwtab.log&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;372903 fwtab.log&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;[Expert@XxXx-FW01:0]#&lt;/P&gt;&lt;/TD&gt;&lt;TD width="50%"&gt;&lt;P&gt;[Expert@XxXx-FW01:0]# time ( fw ctl conntab &amp;gt; fwconntab.log )&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;real 0m2.351s&lt;/STRONG&gt;&lt;BR /&gt;user 0m1.129s&lt;BR /&gt;sys 0m0.426s&lt;BR /&gt;[Expert@XxXx-FW01:0]#&lt;BR /&gt;[Expert@XxXx-FW01:0]# wc -l fwconntab.log&lt;BR /&gt;&lt;STRONG&gt;189586 fwconntab.log&lt;/STRONG&gt;&lt;BR /&gt;[Expert@XxXx-FW01:0]#&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What is unclear for me right now, are those two "fw&amp;nbsp;tab -u -t connections -f" and "fw ctl conntab" showing same connections or there could be differences ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Which&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;one is better to use and report connections at a certain point and work with?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also can someone clarify it contains the "fw ctl multik gconn", as if I address this table, I get other value for number of connections&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thinking_face:"&gt;🤔&lt;/span&gt; .&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;&lt;P&gt;[Expert@XxXx-FW01:0]# fw ctl multik gconn -s&lt;BR /&gt;Summary:&lt;BR /&gt;Total number of global connections: &lt;STRONG&gt;213982&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;[Expert@XxXx-FW01:0]#&lt;/P&gt;&lt;P&gt;[Expert@XxXx-FW01:0]# time ( fw ctl multik gconn &amp;gt; gconn.log )&lt;/P&gt;&lt;P&gt;real 0m1.377s&lt;BR /&gt;user 0m0.851s&lt;BR /&gt;sys 0m0.211s&lt;BR /&gt;[Expert@XxXx-FW01:0]# wc -l gconn.log&lt;BR /&gt;&lt;STRONG&gt;209247 gconn.log&lt;/STRONG&gt;&lt;BR /&gt;[Expert@XxXx-FW01:0]#&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PS: after I finish the script and have a final version, I'll share it....&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 11:39:28 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Connection-table-Confusion/m-p/151136#M24626</guid>
      <dc:creator>Sorin_Gogean</dc:creator>
      <dc:date>2022-06-17T11:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Connection table Confusion</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Connection-table-Confusion/m-p/151213#M24641</link>
      <description>&lt;P&gt;fw tab -t connections -u and fw ctl conntab should show the same information about active connections since they're ultimately coming from the same location (kernel tables).&lt;BR /&gt;Not sure when fw ctl conntab was added, but fw tab (and friends) have been around since the earliest days of the product.&lt;/P&gt;
&lt;P&gt;My understanding is that fw ctl multik gconn provides more details about existing connections (namely what cores they are being distributed onto).&lt;BR /&gt;As such, I'd expect it to include everything that's in fw ctl conntab.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jun 2022 19:40:07 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Connection-table-Confusion/m-p/151213#M24641</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2022-06-19T19:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: Connection table Confusion</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Connection-table-Confusion/m-p/151230#M24649</link>
      <description>&lt;P&gt;thank you&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/7"&gt;@PhoneBoy&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;still I'm not so convinced, as I see some discrepancies in the number of lines because the "&lt;SPAN&gt;fw tab -u -t connections&lt;/SPAN&gt;" returns double the amount of lines/connections if we compare with "&lt;SPAN&gt;fw ctl conntab&lt;/SPAN&gt;" . Could it be because of the "accounting" being enabled on some rules?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you can observe, the reported Concurrent connections were 99K and we got from different commands, values like 373K (almost 4 times) or 190K (almost 2 times) or 209K (a bit more than 2 times) .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;&lt;SPAN&gt;[Expert@XxXx-FW01:0]# fw ctl pstat | grep Concurrent | awk '{print $3}'&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;97807&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;[Expert@XxXx-FW01:0]#&lt;/SPAN&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD height="47px"&gt;&lt;SPAN&gt;Collecting "fw tab -u -t connections -f &amp;gt; fwtab.log" we get 373K lines in the file.....&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD height="47px"&gt;&lt;SPAN&gt;Collecting "fw ctl conntab &amp;gt; fwconntab.log" we get 190K lines in the file.....&lt;/SPAN&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="69px"&gt;&lt;SPAN&gt;[Expert@XxXx-FW01:0]# wc -l fwtab.log&lt;/SPAN&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;372903 fwtab.log&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;SPAN&gt;[Expert@XxXx-FW01:0]#&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD width="50%" height="69px"&gt;&lt;SPAN&gt;[Expert@XxXx-FW01:0]# wc -l fwconntab.log&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;189586 fwconntab.log&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;[Expert@XxXx-FW01:0]#&lt;/SPAN&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you,&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 07:17:54 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Connection-table-Confusion/m-p/151230#M24649</guid>
      <dc:creator>Sorin_Gogean</dc:creator>
      <dc:date>2022-06-20T07:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Connection table Confusion</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Connection-table-Confusion/m-p/151292#M24678</link>
      <description>&lt;P&gt;The difference in counts is due to how connections are reported and to some degree output formatting.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;fw tab -u -t connections -f&lt;/STRONG&gt; doesn't really track connections as a singular&amp;nbsp;entity; it tracks flows of packets.&amp;nbsp; For non-NATted connections there will be two lines shown for every "connection", a c2s (client to server) flow from the original initiator to the responder, and a s2c (server to client) return flow.&amp;nbsp; For connections that are NATted, there will be 4 total flow lines in the output: c2s pre-NAT, c2s post-NAT, s2c pre-NAT, and s2c post-NAT.&amp;nbsp; This is why the fw tab command shows 4X the true number of connections displayed by &lt;STRONG&gt;fw ctl pstat&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;fw ctl conntab&lt;/STRONG&gt; shows each connection and all its associated flows on just one line, however it does place a newline after each reported connection.&amp;nbsp; So if you are doing a straight line count this command will show 2X the amount reported by &lt;STRONG&gt;fw ctl pstat&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;All of the above counts are tracked on the Firewall Worker/Instance cores.&lt;/P&gt;
&lt;P&gt;On the other hand &lt;STRONG&gt;fw ctl multik gconn&lt;/STRONG&gt; is showing what the Dynamic Dispatcher is doing on the SND cores, namely keeping track of which connections and their associated flows are assigned to which Firewall Worker/Instance.&amp;nbsp; It operates similarly to the fw tab command and will show 4 lines/flows for each NATted connection.&amp;nbsp; I believe the slightly elevated count for&amp;nbsp;&lt;STRONG&gt;fw ctl multik gconn&lt;/STRONG&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt; over fw tab is due to the fact that a connection's worker core assignment will stick around for a bit in the Global Connections table, even after the connection has been closed and removed from the table on the Firewall Workers.&amp;nbsp; I assume this helps ensure that if a wayward late packet for what appears to be a closed connection happens to show up, it will still be sent to the original worker core who may "resurrect" it via something like this:&amp;nbsp;&lt;A class="cp_link sc_ellipsis" href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk24960&amp;amp;partition=Advanced&amp;amp;product=Quantum" target="_blank" rel="noopener"&gt;sk24960: "Smart Connection Reuse" feature modifies some SYN packets&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 15:19:10 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Connection-table-Confusion/m-p/151292#M24678</guid>
      <dc:creator>Timothy_Hall</dc:creator>
      <dc:date>2022-06-20T15:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Connection table Confusion</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Connection-table-Confusion/m-p/151341#M24703</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/597"&gt;@Timothy_Hall&lt;/a&gt;&amp;nbsp;, it's exactly what I was looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was pretty convinced that "&lt;STRONG&gt;fw tab -u -t connections -f&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;" would hold more information/lines and one reason I was considering, was Accounting, I didn't knew about NAT and others.&lt;/P&gt;
&lt;P&gt;As for the "&lt;STRONG&gt;fw ctl conntab&lt;/STRONG&gt;" - that is true, and therefore in my script I'm dropping the new-lines, so I will address this for future reportings.&lt;/P&gt;
&lt;P&gt;"&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;fw ctl multik gconn&lt;/STRONG&gt;" was a newly found command, that would show connections, and I didn't researched further.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I'll go and change from "&lt;STRONG&gt;fw tab -u -t connections -f&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;" to "&lt;STRONG&gt;fw ctl conntab&lt;/STRONG&gt;" and see what are the results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 07:52:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Connection-table-Confusion/m-p/151341#M24703</guid>
      <dc:creator>Sorin_Gogean</dc:creator>
      <dc:date>2022-06-21T07:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Connection table Confusion</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Connection-table-Confusion/m-p/154024#M26006</link>
      <description>&lt;P&gt;Does rebooting a clusterXL member equate to also clearing its connection table?&amp;nbsp; &amp;nbsp;Or is the connections table just replicated on each member?&amp;nbsp; &amp;nbsp;If it is replicated, does clearing the connections table on one member clear it for all members?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 20:14:49 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Connection-table-Confusion/m-p/154024#M26006</guid>
      <dc:creator>Daniel_Kavan</dc:creator>
      <dc:date>2022-07-27T20:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Connection table Confusion</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Connection-table-Confusion/m-p/154030#M26009</link>
      <description>&lt;P&gt;Connections table is replicated on each member.&lt;BR /&gt;I do not know what will happen on the other member if you clear the connection table on one member.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 22:38:39 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Connection-table-Confusion/m-p/154030#M26009</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2022-07-27T22:38:39Z</dc:date>
    </item>
  </channel>
</rss>

