- Products
- Learn
- Local User Groups
- Partners
- More
What’s New in Device Diagnostics?
Dec 2nd @ 5pm CET / 11am EST
AI Security Masters
Security in the Pace of AI:
From Threat to Force Multiplier
CPX is Back!
Join us in Las Vegas, Vienna, and/or Bangkok!
Check Point Named a Leader
The Forrester Wave:
Enterprise Firewall Solutions, Q4 2026
What’s New in Agentic Network Orchestration
CheckMates Go:
Fun Ding
Here is a oneliner to show the Firewall and SecureXL mode (User or Kernel):
| M=`cpprod_util FwIsUsermode`; [ $M == 1 ] && { M="User Mode"; } || { M="Kernel Mode"; }; echo "Firewall is: $M"; M=`cpprod_util SxlIsUsermode`; [ $M == 1 ] && { M="User Mode"; } || { M="Kernel Mode"; }; echo "SecureXL is: $M" |
The output for example:
| Firewall is: User Mode SecureXL is: Kernel Mode |
This oneliner is based on Heiko's earlier oneliner found here: Firewall Mode: User / Kernel - Check Point CheckMates
Finding the SecureXL mode is much more easy now instead of interpreting the output of the command: fwaccel stat (UPPAK or KPPAK)
Two fairly minor notes:
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.
You don't actually need the braces and semicolons in the then and else clauses.
Here are the lines with those two changes applied:
[Expert@TestFW]# M=$(cpprod_util FwIsUsermode);[ $M == 1 ] && M="User Mode" || M="Kernel Mode";echo "Firewall is: $M"
Firewall is: User Mode
[Expert@TestFW]# M=$(cpprod_util SxlIsUsermode);[ $M == 1 ] && M="User Mode" || M="Kernel Mode";echo "SecureXL is: $M"
SecureXL is: Kernel Mode
Nice, just tried it in the lab.
Awesome.
Andy
[Expert@CP-GW:0]# M=`cpprod_util FwIsUsermode`; [ $M == 1 ] && { M="User Mode"; } || { M="Kernel Mode"; }; echo "Firewall is: $M"; M=`cpprod_util SxlIsUsermode`; [ $M == 1 ] && { M="User Mode"; } || { M="Kernel Mode"; }; echo "SecureXL is: $M"
Firewall is: User Mode
SecureXL is: Kernel Mode
[Expert@CP-GW:0]#
Two fairly minor notes:
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.
You don't actually need the braces and semicolons in the then and else clauses.
Here are the lines with those two changes applied:
[Expert@TestFW]# M=$(cpprod_util FwIsUsermode);[ $M == 1 ] && M="User Mode" || M="Kernel Mode";echo "Firewall is: $M"
Firewall is: User Mode
[Expert@TestFW]# M=$(cpprod_util SxlIsUsermode);[ $M == 1 ] && M="User Mode" || M="Kernel Mode";echo "SecureXL is: $M"
SecureXL is: Kernel Mode
With some more (performance) optimization, as real oneliner and without a M variable 😉
[[ $(cpprod_util FwIsUsermode) -eq 1 ]] && echo Firewall is: User Mode || echo Firewall is: Kernel Mode
[[ $(cpprod_util SxlIsUsermode) -eq 1 ]] && echo SecureXL is: User Mode || echo SecureXL is: Kernel Mode
Excellent additions guys!
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):
echo "Firewall is $([ $(cpprod_util FwIsUsermode) == 1 ] && echo User || echo Kernel) Mode"
echo "SecureXL is $([ $(cpprod_util SxlIsUsermode) == 1 ] && echo User || echo Kernel) Mode"
@Bob_Zimmerman 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....
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 7 | |
| 6 | |
| 6 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
Tue 24 Nov 2026 @ 01:30 PM (GMT)
La nueva realidad de los ataques DDoS: autonomía, escala y el futuro de la defensaWed 02 Dec 2026 @ 03:30 PM (GMT)
The New DDoS Reality: Autonomy, Scale, and the Future of DefenseThu 03 Dec 2026 @ 11:00 AM (EST)
Under the Hood: Check Point Cloud Firewall for Nutanix - How to Secure your AI WorkloadsTue 24 Nov 2026 @ 01:30 PM (GMT)
La nueva realidad de los ataques DDoS: autonomía, escala y el futuro de la defensaWed 02 Dec 2026 @ 03:30 PM (GMT)
The New DDoS Reality: Autonomy, Scale, and the Future of DefenseThu 03 Dec 2026 @ 11:00 AM (EST)
Under the Hood: Check Point Cloud Firewall for Nutanix - How to Secure your AI WorkloadsAbout CheckMates
Learn Check Point
Advanced Learning
WE SECURE YOUR AI TRANSFORMATION