<?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: Long-lived TCP connection got timed-out ungracefully. First packet isn't SYN. TCP-Flag: PUSH-ACK in Firewall and Security Management</title>
    <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Long-lived-TCP-connection-got-timed-out-ungracefully-First/m-p/165432#M29661</link>
    <description>&lt;P&gt;This will not work for accelerated connections:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;fw_rst_expired_conn&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So if you have SecureXL enabled and you are running R80,20 and higher this will not work for you for most of the connections because they are accelerated in some way. SXL, PXL, QXL, ... and only very few F2F.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Dec 2022 15:18:26 GMT</pubDate>
    <dc:creator>Alexander_Wilke</dc:creator>
    <dc:date>2022-12-16T15:18:26Z</dc:date>
    <item>
      <title>Long-lived TCP connection got timed-out ungracefully. First packet isn't SYN. TCP-Flag: PUSH-ACK</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Long-lived-TCP-connection-got-timed-out-ungracefully-First/m-p/36459#M24113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Checkpoint Next Generation FW: R80.10&lt;/P&gt;&lt;P&gt;Aggressive aging: enabled&lt;/P&gt;&lt;P&gt;Virtual session timeout: 3600(s)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have a long-lived TCP connection over the Checkpoint gateway firewall. After 1 hour of idle, the connection got timed-out by checkpoint, and on the checkpoint we found the error: "&lt;SPAN style="color: #000000; font-weight: normal; text-decoration: none; font-size: medium;"&gt;First packet isn't SYN. TCP-Flag: PUSH-ACK"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-weight: normal; text-decoration: none; font-size: medium;"&gt;Is this because Checkpoint doesn't drop the connection nicely (not sending the FIN flag to the source) which caused the source keep sending data without initiate a new connection? If it's the case, how can we configure Checkpoint to send FIN to the source when it drops connection and should we do that?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2018 19:05:57 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Long-lived-TCP-connection-got-timed-out-ungracefully-First/m-p/36459#M24113</guid>
      <dc:creator>Andy_Nguyen</dc:creator>
      <dc:date>2018-10-18T19:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Long-lived TCP connection got timed-out ungracefully. First packet isn't SYN. TCP-Flag: PUSH-ACK</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Long-lived-TCP-connection-got-timed-out-ungracefully-First/m-p/36460#M24114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't have the Check Point send a FIN upon state table connection timeout, but you can have it send a RST to both sides which will immediately notify them that the connection is dead.&amp;nbsp; From my book:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;STRONG&gt;Sending a TCP RST upon Connection Expiration&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Some applications (such as web servers backending into a database server with a SQL&lt;BR /&gt;connection) create a large number of TCP connections, yet never send any appreciable&lt;BR /&gt;amount of data in them. All stateful inspection firewalls (including Check Point) enforce&lt;BR /&gt;an idle timer on all open connections. Check Point’s TCP connection idle timer is set to&lt;BR /&gt;60 minutes by default. Unfortunately when the Check Point TCP idle timer expires a&lt;BR /&gt;TCP connection, by default that connection is silently removed from the firewall’s state&lt;BR /&gt;table, and no notification of any kind is sent to the two systems who established the TCP&lt;BR /&gt;connection. When one of them attempts to send some data in the now-dead connection,&lt;BR /&gt;it is promptly dropped by the firewall with a “TCP out of state” message. Regrettably&lt;BR /&gt;some applications are just too stupid to quickly realize the connection is dead; they&lt;BR /&gt;continue attempting to use it while their traffic continues to be dropped.&lt;BR /&gt;At some point, one or both of the end systems involved finally figures out their&lt;BR /&gt;connection is truly and irrevocably dead, launches a new TCP connection that is&lt;BR /&gt;immediately permitted by the firewall, and everything starts working again. Depending&lt;BR /&gt;on how long it takes one or both sides to figure out what happened, the application may&lt;BR /&gt;appear to be hung and the user’s perception of overall application performance will be&lt;/P&gt;&lt;P&gt;terrible. Undoubtedly the firewall will be blamed for the application’s behavior, and&lt;BR /&gt;once again the firewall administrators must exonerate themselves. There are three&lt;BR /&gt;solutions to this problem:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1. Enable TCP keepalives on one or both of the systems participating in the TCP&lt;BR /&gt;connections that keep getting idled out. The keepalives will need to be sent at&lt;BR /&gt;least every 60 minutes. This is not a popular choice as it involves application&lt;BR /&gt;system changes to fix what is perceived as a “firewall problem”.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;2. Increase the idle timeout for the Service object (SQL in our example) on the&lt;BR /&gt;Advanced tab of the service object from the default of 60 minutes up to a&lt;BR /&gt;maximum of 86400 seconds (24 hours) This will probably help but is not&lt;BR /&gt;foolproof:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.checkpoint.com/legacyfs/online/checkpoint/71695_sql.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Configure the firewall to send a TCP RST packet to both participants of a&lt;BR /&gt;connection that has been idled out. Upon receipt of the TCP RST, both&lt;BR /&gt;participants instantly realize their connection is gone and launch a new one&lt;BR /&gt;immediately to recover from the situation. To enable this feature “on the fly”, the&lt;/P&gt;&lt;P&gt;command is &lt;STRONG&gt;fw ctl set int fw_rst_expired_conn 1&lt;/STRONG&gt; . This setting will&lt;BR /&gt;not survive a reboot, so to make it permanent you’ll need to see the following for&lt;BR /&gt;more details: sk19746: How to force a Security Gateway to send a TCP RST&lt;BR /&gt;packet upon TCP connection expiration.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In some cases however #3 will not fully remediate the situation, and you will be&lt;BR /&gt;forced to go one step further with this:&lt;STRONG&gt; fw ctl set int&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;fw_reject_non_syn 1&lt;/STRONG&gt; . A classic example of an application that requires this&lt;BR /&gt;firewall setting is SAP HANA traffic. This setting also handles client port reuse&lt;BR /&gt;out of state errors when RST packets from the server to the clients get lost (e.g.&lt;BR /&gt;due to policy install or packet loss). Bear in mind however that this setting is&lt;BR /&gt;quite likely to make your friendly auditor/penetration tester upset with you, since&lt;BR /&gt;the firewall will now issue a TCP RST for all received packets that are out of&lt;BR /&gt;state and have the ACK flag set. An auditor running a TCP ACK nmap scan will&lt;BR /&gt;have it light up like a Christmas tree with tens of thousands of ports showing up&lt;BR /&gt;as filtered instead of closed. For this reason, using this setting is generally not&lt;BR /&gt;recommended on an Internet perimeter firewall, but may be acceptable on some&lt;BR /&gt;internal firewalls.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;--&lt;BR /&gt;Second Edition of my "Max Power" Firewall Book&lt;BR /&gt;&lt;SPAN&gt;Now Available at &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.maxpowerfirewalls.com" rel="nofollow"&gt;http://www.maxpowerfirewalls.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2018 12:48:45 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Long-lived-TCP-connection-got-timed-out-ungracefully-First/m-p/36460#M24114</guid>
      <dc:creator>Timothy_Hall</dc:creator>
      <dc:date>2018-10-19T12:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: Long-lived TCP connection got timed-out ungracefully. First packet isn't SYN. TCP-Flag: PUSH-ACK</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Long-lived-TCP-connection-got-timed-out-ungracefully-First/m-p/36461#M24115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is also what we suspected. Thank you very much for your thorough explanation.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2018 15:47:21 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Long-lived-TCP-connection-got-timed-out-ungracefully-First/m-p/36461#M24115</guid>
      <dc:creator>Andy_Nguyen</dc:creator>
      <dc:date>2018-10-19T15:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Long-lived TCP connection got timed-out ungracefully. First packet isn't SYN. TCP-Flag: PUSH-ACK</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Long-lived-TCP-connection-got-timed-out-ungracefully-First/m-p/61780#M24116</link>
      <description>&lt;P&gt;With option 3 (&lt;SPAN&gt;sk19746) enabled&lt;/SPAN&gt;, I am looking for the best way to verify the option is working. I have run a TCPDUMP on the gateway but do not see any reset packets for the traffic that is timing out. Is there any debug command that could be run to verify the option is working? I have some traffic set to a custom idle timeout of 900 seconds (5 minutes). I can see the connections timing out by monitoring the connection table (fw tab -t connections -u) but I do not see any reset packets.&lt;/P&gt;&lt;P&gt;I have a support case open with Checkpoint, but so far no help.&lt;/P&gt;&lt;P&gt;A little supporting information. R80.30 gateways, open hardware, fw accel off during the TCPDUMP. Monitored both interfaces in both directions of the traffic flow.&lt;/P&gt;&lt;P&gt;Any assistance will be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 15:57:40 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Long-lived-TCP-connection-got-timed-out-ungracefully-First/m-p/61780#M24116</guid>
      <dc:creator>Christopher_Rag</dc:creator>
      <dc:date>2019-09-03T15:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Long-lived TCP connection got timed-out ungracefully. First packet isn't SYN. TCP-Flag: PUSH-ACK</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Long-lived-TCP-connection-got-timed-out-ungracefully-First/m-p/83643#M24117</link>
      <description>&lt;P&gt;I have had a same sort of issue. We have a customer who had a problem with an application that was non tcp compliant.&lt;BR /&gt;The traffic was dropped with the famous "First packet isnt syn message". This was for the tcp flag PSH &amp;amp; RST.&lt;BR /&gt;When I followed the stream. I saw that the connection was removed from the connection table, but the appliaction was still thinking to reuse the connection.&lt;BR /&gt;There was a mismatch in the tcp communication. I saw this thread and thought about the options, but they are all globally.&lt;/P&gt;&lt;P&gt;I found another solution. I trust the source and destination and found the sk11088. What says the following:&lt;/P&gt;&lt;P&gt;Bypassing this mechanism for specific scenarios means that non-synchronized packets that do not belong to an established&lt;BR /&gt;connection in the Security Gateway's connections table OR non-TCP compliant traffic will not be dropped,&lt;BR /&gt;but instead matched against the Security Policy (Rule base).&lt;/P&gt;&lt;P&gt;So, I made a bypass for this source and destination. It is not nicest solution, but its better than do a global setting that's affecting all traffic passing through the firewall.&lt;/P&gt;&lt;P&gt;If you trust the traffic than this can be a live saver.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 17:13:17 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Long-lived-TCP-connection-got-timed-out-ungracefully-First/m-p/83643#M24117</guid>
      <dc:creator>Niels_Bijleveld</dc:creator>
      <dc:date>2020-04-29T17:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Long-lived TCP connection got timed-out ungracefully. First packet isn't SYN. TCP-Flag: PUSH-ACK</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Long-lived-TCP-connection-got-timed-out-ungracefully-First/m-p/84055#M24118</link>
      <description>I wanted to add the solution to my own problem and I will like to share it with you. It can be helpfull for the first packet isn syn message. I monitored the connection table for a specific ip. I couldnt match why is will be dissappeared, but finally I saw it and tested it. The problem lay in the aggressive aging of the https service port. After removing this the connection it keeped stable and the RST packet can know be send becasue the connection will be still there and now it will not be dropped. So I revert the bypass method as described above and disabled the aggressive aging of https service. This works much better now.</description>
      <pubDate>Mon, 04 May 2020 11:41:07 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Long-lived-TCP-connection-got-timed-out-ungracefully-First/m-p/84055#M24118</guid>
      <dc:creator>Niels_Bijleveld</dc:creator>
      <dc:date>2020-05-04T11:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Long-lived TCP connection got timed-out ungracefully. First packet isn't SYN. TCP-Flag: PUSH-ACK</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Long-lived-TCP-connection-got-timed-out-ungracefully-First/m-p/86046#M24119</link>
      <description>option 3 (first part "fw ctl set int fw_rst_expired_conn 1") solved it.&lt;BR /&gt;Thanks for you explanations about this subject.</description>
      <pubDate>Fri, 22 May 2020 08:52:08 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Long-lived-TCP-connection-got-timed-out-ungracefully-First/m-p/86046#M24119</guid>
      <dc:creator>Gerard_van_Lee1</dc:creator>
      <dc:date>2020-05-22T08:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Long-lived TCP connection got timed-out ungracefully. First packet isn't SYN. TCP-Flag: PUSH-ACK</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Long-lived-TCP-connection-got-timed-out-ungracefully-First/m-p/149740#M24120</link>
      <description>&lt;P&gt;Thanks for your answer Tim. If i might ask... i find &lt;SPAN&gt;sk19746 a bit confusing. If i read the SK i see this part:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Important&lt;/STRONG&gt;: due to code limitation, starting from R80.20, this feature does not work when SecureXL is enabled.&lt;BR /&gt;As a workaround, add "&lt;EM&gt;fw_reject_non_syn=1&lt;/EM&gt;" to the&amp;nbsp;&lt;EM&gt;$FWDIR/modules/fwkern.conf&lt;/EM&gt;&amp;nbsp;file.&lt;BR /&gt;This will provide the same result and will send RST packet post “First packet isn’t SYN”.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Does this mean the "on the fly" part only works with SecureXL Off OR this entry "&lt;EM&gt;fw_reject_non_syn=1&lt;/EM&gt;&lt;SPAN&gt;" in the&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;$FWDIR/modules/fwkern.conf&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;file?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The best way is to test this in my my lab i know(and i will)... but i would like to know if i am misreading this information...&lt;/P&gt;</description>
      <pubDate>Mon, 30 May 2022 14:15:15 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Long-lived-TCP-connection-got-timed-out-ungracefully-First/m-p/149740#M24120</guid>
      <dc:creator>_Jelle</dc:creator>
      <dc:date>2022-05-30T14:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Long-lived TCP connection got timed-out ungracefully. First packet isn't SYN. TCP-Flag: PUSH-ACK</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Long-lived-TCP-connection-got-timed-out-ungracefully-First/m-p/165432#M29661</link>
      <description>&lt;P&gt;This will not work for accelerated connections:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;fw_rst_expired_conn&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So if you have SecureXL enabled and you are running R80,20 and higher this will not work for you for most of the connections because they are accelerated in some way. SXL, PXL, QXL, ... and only very few F2F.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 15:18:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Long-lived-TCP-connection-got-timed-out-ungracefully-First/m-p/165432#M29661</guid>
      <dc:creator>Alexander_Wilke</dc:creator>
      <dc:date>2022-12-16T15:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Long-lived TCP connection got timed-out ungracefully. First packet isn't SYN. TCP-Flag: PUSH-ACK</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Long-lived-TCP-connection-got-timed-out-ungracefully-First/m-p/165433#M29662</link>
      <description>&lt;P&gt;Will not work reliably if you upgrade to R80.20 and higher.&lt;/P&gt;&lt;P&gt;Keep this in mind.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 15:19:22 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Long-lived-TCP-connection-got-timed-out-ungracefully-First/m-p/165433#M29662</guid>
      <dc:creator>Alexander_Wilke</dc:creator>
      <dc:date>2022-12-16T15:19:22Z</dc:date>
    </item>
  </channel>
</rss>

