<?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 Debug Filter Battle -- fw monitor -F vs. fw ctl zdebug + drop in Firewall and Security Management</title>
    <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Debug-Filter-Battle-fw-monitor-F-vs-fw-ctl-zdebug-drop/m-p/147374#M23516</link>
    <description>&lt;P&gt;&lt;SPAN&gt;This article addresses a rather concerning interaction between &lt;STRONG&gt;fw monitor -F&lt;/STRONG&gt; and the &lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt; commands when they are run simultaneously.&amp;nbsp; One major caution with using &lt;STRONG&gt;fw monitor -F&lt;/STRONG&gt; is avoiding a situation where you would start receiving a completely unfiltered capture, as it could significantly&amp;nbsp;impact the performance and even the stability of the firewall in extreme cases.&amp;nbsp; This is due to the fact that &lt;STRONG&gt;fw monitor -F&lt;/STRONG&gt; captures packets directly in the sim/SecureXL driver, whose proper functioning is critical for timely handling of traffic and avoiding packet loss at the network level.&amp;nbsp; &amp;nbsp;One way to have this happen was making a typo in the &lt;STRONG&gt;&amp;lt;srcIP,srcPort,dstIP,dstPort,protocol&amp;gt;&lt;/STRONG&gt; traffic filter or trying to use a wildcard in the matching filter.&amp;nbsp; In this case no filtering debug flags at all would be set in the sim/SecureXL driver, and an unfiltered capture would be the result.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As it turns out the &lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt; command also interacts with the sim/SecureXL debug filtering settings.&amp;nbsp; As a result if both commands are run simultaneously, they can interfere with each other and suddenly cause an unfiltered capture to occur.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Note that&amp;nbsp;&lt;STRONG&gt;fw monitor -e&lt;/STRONG&gt; captures traffic in the F2F path chain&amp;nbsp;modules on the Firewall Workers/Instances and is not subject to this effect.&amp;nbsp; &lt;STRONG&gt;tcpdump&lt;/STRONG&gt; and &lt;STRONG&gt;cppcap&lt;/STRONG&gt; also do not interact with the sim/SecureXL debug filter flags.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Consider this first sequence of events:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Prompt1# &lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Prompt2# &lt;STRONG&gt;fw monitor -F&amp;nbsp;8.8.8.8,0,0,0,0 -F 0,0,8.8.8.8,0,0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Both running commands work properly.&amp;nbsp; However if CNTRL-C is hit to stop the &lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt;, it essentially performs a &lt;STRONG&gt;fw ctl debug 0&lt;/STRONG&gt; which resets all debugging flags &lt;EM&gt;and debug filters&lt;/EM&gt; in sim/SecureXL and the Firewall Workers/Instances.&amp;nbsp; Result: The&amp;nbsp;&lt;STRONG&gt;fw monitor -F&lt;/STRONG&gt; capture suddenly becomes unfiltered!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Now consider this second sequence:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Prompt1# &lt;STRONG&gt;fw monitor -F&amp;nbsp;8.8.8.8,0,0,0,0 -F 0,0,8.8.8.8,0,0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Prompt2# &lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The &lt;STRONG&gt;fw monitor -F&lt;/STRONG&gt; capture is properly filtered initially, until&amp;nbsp;&lt;STRONG&gt;fw ctl zdebug + drop &lt;/STRONG&gt;is run, at which time the&amp;nbsp;&lt;STRONG&gt;fw monitor -F&lt;/STRONG&gt; capture suddenly becomes unfiltered!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;And now the final sequence:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Prompt1# &lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Prompt2# &lt;STRONG&gt;fw monitor -F&amp;nbsp;8.8.8.8,0,0,0,0 -F 0,0,8.8.8.8,0,0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Both running commands work properly.&amp;nbsp; Now we CNTRL-C the &lt;STRONG&gt;fw monitor -F&lt;/STRONG&gt; command first, and the properly filtered capture stops.&amp;nbsp; The&amp;nbsp;&lt;STRONG&gt;fw ctl zdebug + drop&amp;nbsp;&lt;/STRONG&gt;command continues to work properly until we terminate it.&amp;nbsp; However note that when both commands are running simultaneously&amp;nbsp;in this fashion, any traffic dropped by sim/SecureXL (this is not common - most drops occur on a Firewall Instance/Worker) will only be shown by &lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt; if it matches the active&amp;nbsp;&lt;STRONG&gt;fw monitor -F&lt;/STRONG&gt; capture filter.&amp;nbsp; This is because there is one (and only one) set of sim/SecureXL debug filtering settings that these two commands share, which is the root cause of this entire issue.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;TAKEAWAY: If you need to run these two commands simultaneously, the proper order to keep them from interfering with each other is:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&lt;STRONG&gt;fw monitor -F (filter)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;When the capturing/debugging is complete:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;Stop the &lt;STRONG&gt;fw monitor -F&lt;/STRONG&gt; command &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;Stop the &lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt; command&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Another option to ensure any rare drops in sim/SecureXL can always be seen would be to use &lt;STRONG&gt;tcpdump&lt;/STRONG&gt;/&lt;STRONG&gt;cppcap&lt;/STRONG&gt; for the packet capturing portion (these tools can successfully capture even fully-accelerated&amp;nbsp;traffic in almost all cases) while &lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt;&amp;nbsp;is running instead of utilizing&amp;nbsp;&lt;STRONG&gt;fw monitor -F&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&lt;EM&gt;Note that in some Check Point documentation, use of the command &lt;STRONG&gt;fw ctl zdebug drop&lt;/STRONG&gt; is shown instead without the&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;extra "+" character. When including this "+" character, drops performed by SecureXL (although much more rare than&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;drops by Firewall/INSPECT) will be included in the output as well. To ensure that all drops are seen (not just those by&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;INSPECT) use &lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt; with the "+" character.&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This statement is incorrect, drops that occur inside sim/SecureXL will still be shown even if the "+" is not included.&amp;nbsp; As far as I can tell adding the "+" option causes additional "housekeeping" debug output to appear that is indirectly related to the dropping of packets, in addition to the standard output showing the direct dropping of packets by Check Point code.&amp;nbsp; While these extra&amp;nbsp; "housekeeping" messages probably won't make much sense to most Check Point administrators, they may well be useful to TAC and R&amp;amp;D if a case is opened.&amp;nbsp; Therefore the recommendation is to always include the "+" option with &lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt; just in case you capture a rare, intermittent drop event while this command is running and need to open a case with TAC for further clarification.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Mar 2025 12:54:02 GMT</pubDate>
    <dc:creator>Timothy_Hall</dc:creator>
    <dc:date>2025-03-17T12:54:02Z</dc:date>
    <item>
      <title>Debug Filter Battle -- fw monitor -F vs. fw ctl zdebug + drop</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Debug-Filter-Battle-fw-monitor-F-vs-fw-ctl-zdebug-drop/m-p/147374#M23516</link>
      <description>&lt;P&gt;&lt;SPAN&gt;This article addresses a rather concerning interaction between &lt;STRONG&gt;fw monitor -F&lt;/STRONG&gt; and the &lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt; commands when they are run simultaneously.&amp;nbsp; One major caution with using &lt;STRONG&gt;fw monitor -F&lt;/STRONG&gt; is avoiding a situation where you would start receiving a completely unfiltered capture, as it could significantly&amp;nbsp;impact the performance and even the stability of the firewall in extreme cases.&amp;nbsp; This is due to the fact that &lt;STRONG&gt;fw monitor -F&lt;/STRONG&gt; captures packets directly in the sim/SecureXL driver, whose proper functioning is critical for timely handling of traffic and avoiding packet loss at the network level.&amp;nbsp; &amp;nbsp;One way to have this happen was making a typo in the &lt;STRONG&gt;&amp;lt;srcIP,srcPort,dstIP,dstPort,protocol&amp;gt;&lt;/STRONG&gt; traffic filter or trying to use a wildcard in the matching filter.&amp;nbsp; In this case no filtering debug flags at all would be set in the sim/SecureXL driver, and an unfiltered capture would be the result.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As it turns out the &lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt; command also interacts with the sim/SecureXL debug filtering settings.&amp;nbsp; As a result if both commands are run simultaneously, they can interfere with each other and suddenly cause an unfiltered capture to occur.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Note that&amp;nbsp;&lt;STRONG&gt;fw monitor -e&lt;/STRONG&gt; captures traffic in the F2F path chain&amp;nbsp;modules on the Firewall Workers/Instances and is not subject to this effect.&amp;nbsp; &lt;STRONG&gt;tcpdump&lt;/STRONG&gt; and &lt;STRONG&gt;cppcap&lt;/STRONG&gt; also do not interact with the sim/SecureXL debug filter flags.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Consider this first sequence of events:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Prompt1# &lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Prompt2# &lt;STRONG&gt;fw monitor -F&amp;nbsp;8.8.8.8,0,0,0,0 -F 0,0,8.8.8.8,0,0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Both running commands work properly.&amp;nbsp; However if CNTRL-C is hit to stop the &lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt;, it essentially performs a &lt;STRONG&gt;fw ctl debug 0&lt;/STRONG&gt; which resets all debugging flags &lt;EM&gt;and debug filters&lt;/EM&gt; in sim/SecureXL and the Firewall Workers/Instances.&amp;nbsp; Result: The&amp;nbsp;&lt;STRONG&gt;fw monitor -F&lt;/STRONG&gt; capture suddenly becomes unfiltered!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Now consider this second sequence:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Prompt1# &lt;STRONG&gt;fw monitor -F&amp;nbsp;8.8.8.8,0,0,0,0 -F 0,0,8.8.8.8,0,0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Prompt2# &lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The &lt;STRONG&gt;fw monitor -F&lt;/STRONG&gt; capture is properly filtered initially, until&amp;nbsp;&lt;STRONG&gt;fw ctl zdebug + drop &lt;/STRONG&gt;is run, at which time the&amp;nbsp;&lt;STRONG&gt;fw monitor -F&lt;/STRONG&gt; capture suddenly becomes unfiltered!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;And now the final sequence:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Prompt1# &lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Prompt2# &lt;STRONG&gt;fw monitor -F&amp;nbsp;8.8.8.8,0,0,0,0 -F 0,0,8.8.8.8,0,0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Both running commands work properly.&amp;nbsp; Now we CNTRL-C the &lt;STRONG&gt;fw monitor -F&lt;/STRONG&gt; command first, and the properly filtered capture stops.&amp;nbsp; The&amp;nbsp;&lt;STRONG&gt;fw ctl zdebug + drop&amp;nbsp;&lt;/STRONG&gt;command continues to work properly until we terminate it.&amp;nbsp; However note that when both commands are running simultaneously&amp;nbsp;in this fashion, any traffic dropped by sim/SecureXL (this is not common - most drops occur on a Firewall Instance/Worker) will only be shown by &lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt; if it matches the active&amp;nbsp;&lt;STRONG&gt;fw monitor -F&lt;/STRONG&gt; capture filter.&amp;nbsp; This is because there is one (and only one) set of sim/SecureXL debug filtering settings that these two commands share, which is the root cause of this entire issue.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;TAKEAWAY: If you need to run these two commands simultaneously, the proper order to keep them from interfering with each other is:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&lt;STRONG&gt;fw monitor -F (filter)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;When the capturing/debugging is complete:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;Stop the &lt;STRONG&gt;fw monitor -F&lt;/STRONG&gt; command &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;Stop the &lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt; command&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Another option to ensure any rare drops in sim/SecureXL can always be seen would be to use &lt;STRONG&gt;tcpdump&lt;/STRONG&gt;/&lt;STRONG&gt;cppcap&lt;/STRONG&gt; for the packet capturing portion (these tools can successfully capture even fully-accelerated&amp;nbsp;traffic in almost all cases) while &lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt;&amp;nbsp;is running instead of utilizing&amp;nbsp;&lt;STRONG&gt;fw monitor -F&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&lt;EM&gt;Note that in some Check Point documentation, use of the command &lt;STRONG&gt;fw ctl zdebug drop&lt;/STRONG&gt; is shown instead without the&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;extra "+" character. When including this "+" character, drops performed by SecureXL (although much more rare than&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;drops by Firewall/INSPECT) will be included in the output as well. To ensure that all drops are seen (not just those by&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;INSPECT) use &lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt; with the "+" character.&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This statement is incorrect, drops that occur inside sim/SecureXL will still be shown even if the "+" is not included.&amp;nbsp; As far as I can tell adding the "+" option causes additional "housekeeping" debug output to appear that is indirectly related to the dropping of packets, in addition to the standard output showing the direct dropping of packets by Check Point code.&amp;nbsp; While these extra&amp;nbsp; "housekeeping" messages probably won't make much sense to most Check Point administrators, they may well be useful to TAC and R&amp;amp;D if a case is opened.&amp;nbsp; Therefore the recommendation is to always include the "+" option with &lt;STRONG&gt;fw ctl zdebug + drop&lt;/STRONG&gt; just in case you capture a rare, intermittent drop event while this command is running and need to open a case with TAC for further clarification.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 12:54:02 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Debug-Filter-Battle-fw-monitor-F-vs-fw-ctl-zdebug-drop/m-p/147374#M23516</guid>
      <dc:creator>Timothy_Hall</dc:creator>
      <dc:date>2025-03-17T12:54:02Z</dc:date>
    </item>
  </channel>
</rss>

