<?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: Firewall and SecureXL Mode: User / Kernel in General Topics</title>
    <link>https://community.checkpoint.com/t5/General-Topics/Firewall-and-SecureXL-Mode-User-Kernel/m-p/237177#M39641</link>
    <description>&lt;P&gt;Nice, just tried it in the lab.&lt;/P&gt;
&lt;P&gt;Awesome.&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;
&lt;P&gt;[Expert@CP-GW:0]# M=`cpprod_util FwIsUsermode`; [ $M == 1 ] &amp;amp;&amp;amp; { M="User Mode"; } || { M="Kernel Mode"; }; echo "Firewall is: $M"; M=`cpprod_util SxlIsUsermode`; [ $M == 1 ] &amp;amp;&amp;amp; { M="User Mode"; } || { M="Kernel Mode"; }; echo "SecureXL is: $M"&lt;BR /&gt;Firewall is: User Mode&lt;BR /&gt;SecureXL is: Kernel Mode&lt;BR /&gt;[Expert@CP-GW:0]#&lt;/P&gt;</description>
    <pubDate>Mon, 30 Dec 2024 14:10:37 GMT</pubDate>
    <dc:creator>the_rock</dc:creator>
    <dc:date>2024-12-30T14:10:37Z</dc:date>
    <item>
      <title>Firewall and SecureXL Mode: User / Kernel</title>
      <link>https://community.checkpoint.com/t5/General-Topics/Firewall-and-SecureXL-Mode-User-Kernel/m-p/237161#M39632</link>
      <description>&lt;P&gt;Here is a oneliner to show the Firewall and SecureXL mode (User&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or Kernel):&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%"&gt;M=`cpprod_util FwIsUsermode`; [ $M == 1 ] &amp;amp;&amp;amp; { M="User Mode"; } || { M="Kernel Mode"; }; echo "Firewall is: $M"; M=`cpprod_util SxlIsUsermode`; [ $M == 1 ] &amp;amp;&amp;amp; { M="User Mode"; } || { M="Kernel Mode"; }; echo "SecureXL is: $M"&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output for example:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%" height="46px"&gt;Firewall is: User Mode&lt;BR /&gt;SecureXL is: Kernel Mode&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This oneliner is based on Heiko's earlier oneliner found here:&amp;nbsp;&lt;A href="https://community.checkpoint.com/t5/Scripts/Firewall-Mode-User-Kernel/m-p/82578" target="_blank" rel="noopener"&gt;Firewall Mode: User / Kernel - Check Point CheckMates&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Finding the SecureXL mode is much more easy now instead of interpreting the output of the command: fwaccel stat (&lt;SPAN&gt;UPPAK or KPPAK)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 13:13:18 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/Firewall-and-SecureXL-Mode-User-Kernel/m-p/237161#M39632</guid>
      <dc:creator>Jones</dc:creator>
      <dc:date>2024-12-30T13:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: Firewall and SecureXL Mode: User / Kernel</title>
      <link>https://community.checkpoint.com/t5/General-Topics/Firewall-and-SecureXL-Mode-User-Kernel/m-p/237177#M39641</link>
      <description>&lt;P&gt;Nice, just tried it in the lab.&lt;/P&gt;
&lt;P&gt;Awesome.&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;
&lt;P&gt;[Expert@CP-GW:0]# M=`cpprod_util FwIsUsermode`; [ $M == 1 ] &amp;amp;&amp;amp; { M="User Mode"; } || { M="Kernel Mode"; }; echo "Firewall is: $M"; M=`cpprod_util SxlIsUsermode`; [ $M == 1 ] &amp;amp;&amp;amp; { M="User Mode"; } || { M="Kernel Mode"; }; echo "SecureXL is: $M"&lt;BR /&gt;Firewall is: User Mode&lt;BR /&gt;SecureXL is: Kernel Mode&lt;BR /&gt;[Expert@CP-GW:0]#&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 14:10:37 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/Firewall-and-SecureXL-Mode-User-Kernel/m-p/237177#M39641</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2024-12-30T14:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: Firewall and SecureXL Mode: User / Kernel</title>
      <link>https://community.checkpoint.com/t5/General-Topics/Firewall-and-SecureXL-Mode-User-Kernel/m-p/237246#M39654</link>
      <description>&lt;P&gt;Two fairly minor notes:&lt;/P&gt;
&lt;P&gt;Backticks are a bad way to work with subshells. The recommended way to run a command in a subshell for substitution purposes is $(...), because then it's unambiguous where the subshell's input ends. Makes it easier to nest this chunk of code in a larger script.&lt;/P&gt;
&lt;P&gt;You don't actually need the braces and semicolons in the then and else clauses.&lt;/P&gt;
&lt;P&gt;Here are the lines with those two changes applied:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[Expert@TestFW]# M=$(cpprod_util FwIsUsermode);[ $M == 1 ] &amp;amp;&amp;amp; M="User Mode" || M="Kernel Mode";echo "Firewall is: $M"
Firewall is: User Mode
[Expert@TestFW]# M=$(cpprod_util SxlIsUsermode);[ $M == 1 ] &amp;amp;&amp;amp; M="User Mode" || M="Kernel Mode";echo "SecureXL is: $M"
SecureXL is: Kernel Mode&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 30 Dec 2024 20:35:12 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/Firewall-and-SecureXL-Mode-User-Kernel/m-p/237246#M39654</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2024-12-30T20:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: Firewall and SecureXL Mode: User / Kernel</title>
      <link>https://community.checkpoint.com/t5/General-Topics/Firewall-and-SecureXL-Mode-User-Kernel/m-p/237395#M39673</link>
      <description>&lt;P&gt;With some more (performance) optimization, as real oneliner and without a M variable&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;[[ $(cpprod_util FwIsUsermode) -eq 1 ]] &amp;amp;&amp;amp; echo Firewall is: User Mode || echo Firewall is: Kernel Mode
[[ $(cpprod_util SxlIsUsermode) -eq 1 ]] &amp;amp;&amp;amp; echo SecureXL is: User Mode || echo SecureXL is: Kernel Mode&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2025 07:08:29 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/Firewall-and-SecureXL-Mode-User-Kernel/m-p/237395#M39673</guid>
      <dc:creator>Daniel_</dc:creator>
      <dc:date>2025-01-02T07:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Firewall and SecureXL Mode: User / Kernel</title>
      <link>https://community.checkpoint.com/t5/General-Topics/Firewall-and-SecureXL-Mode-User-Kernel/m-p/237400#M39678</link>
      <description>&lt;P&gt;Excellent additions guys!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2025 08:04:47 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/Firewall-and-SecureXL-Mode-User-Kernel/m-p/237400#M39678</guid>
      <dc:creator>Jones</dc:creator>
      <dc:date>2025-01-02T08:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Firewall and SecureXL Mode: User / Kernel</title>
      <link>https://community.checkpoint.com/t5/General-Topics/Firewall-and-SecureXL-Mode-User-Kernel/m-p/237438#M39686</link>
      <description>&lt;P&gt;If you're going to go that far, you may as well extract the common parts of the echo and use a second level of subshell (which shows why $(...) is preferred over backticks):&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;echo "Firewall is $([ $(cpprod_util FwIsUsermode) == 1 ] &amp;amp;&amp;amp; echo User || echo Kernel) Mode"
echo "SecureXL is $([ $(cpprod_util SxlIsUsermode) == 1 ] &amp;amp;&amp;amp; echo User || echo Kernel) Mode"&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 02 Jan 2025 14:33:12 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/Firewall-and-SecureXL-Mode-User-Kernel/m-p/237438#M39686</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2025-01-02T14:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: Firewall and SecureXL Mode: User / Kernel</title>
      <link>https://community.checkpoint.com/t5/General-Topics/Firewall-and-SecureXL-Mode-User-Kernel/m-p/237439#M39687</link>
      <description>&lt;P&gt;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/27871"&gt;@Bob_Zimmerman&lt;/a&gt; I had thought about that too, but you are going to loos a few ticks to create a second subshell, but with GHz CPUs it's just a theoretical problem....&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2025 14:37:32 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/Firewall-and-SecureXL-Mode-User-Kernel/m-p/237439#M39687</guid>
      <dc:creator>Daniel_</dc:creator>
      <dc:date>2025-01-02T14:37:32Z</dc:date>
    </item>
  </channel>
</rss>

