useful-cli-commands-check-point
useful-cli-commands-check-point
Point
Cheatsheets
Check Point CLI Reference Card (https://www.roesen.org/files/cp_cli_ref_card.pdf)
FW Monitor (https://www.roesen.org/files/fw_monitor.pdf)
point-articel/cheat-sheets/r80-cheat-sheet-fw-monitor/)
articel/cheat-sheets/r80-cheat-sheet-clusterxl/)
CLISH Commands
To start a transaction in CLISH use start transaction.
Commands - commit, or rollback to be used to end the transaction mode. All changes
made using commands in transaction mode are applied at once or none of the changes are
applied based on the way transaction mode is terminated.
Show Commands
save config save the current configuration
show arp static all displays all the static arp entry
show backup status show the status of a backup or restore operation being
performed
show backup logs show the logs of the recent backups/restores performed
show users show configured users and their homedir, uid/gid and shell
show version all shows version related to os edition, kernel version, product
version etc
Set Commands
add allowed-client host any-host / add allowed- add any host to the allowed clients list/ add allowed client
client host <ip address> by ipv4 address
add backup scp ip value path value username value adds backup to scp server
set cluster member admin {down | up} initiating manual cluster failover
set expert-password set or change password for entering into expert mode
set edition default <value> set the default edition to 32-bit or 64-bit
set ntp server primary x.x.x.x version <1/2/3/4> sets primary ntp server
set ntp server secondary x.x.x.x version <1/2/3/4> sets secondary ntp server
set snmp agent on/off sets the snmp agent daemon on/off
set snmp traps receiver <ip address> version v1 specifies trap receiver
community value
set static-route x.x.x.x/xx nexthop gateway address adds specific static route
x.x.x.x on comment static route
set static-route x.x.x.x/xx comment "{comment}"
set web session-timeout <value> sets web configuration session time-out in minutes
set web ssl-port <value> sets the web ssl-port for the system
Generic Commands
The commands below have to be used in expert mode and NOT in clish.
More information:
How to reset SIC
System
Manage the GUI clients that can use MGMT cp_conf client get # Get the GUI
SmartConsoles to connect to the clients list
Security Management Server cp_conf client add <GUI client> #
Add one GUI Client
cp_conf client del < GUI client 1>
< GUI client 2>... # Delete GUI
Clients
cp_conf client createlist < GUI
client 1> < GUI client 2>... #
Create new list.
/sbin/grub-md5-crypt
cprid_util -server
<IP_of_Gateway> -verbose
cprid_util -server
<IP_of_Gateway> -verbose
<Password_Hash_from_Step_ab
hash
cprid_util -server
<IP_of_Gateway> -verbose
'set expert-password-hash
<Password_Hash_from_Step_ab
**UNDOCUMENTED** GW CLISH:
Show state and timeline of ClusterXL show routed cluster-state
events in CLISH detailed
Logging-and-Reporting/R80-xx-
equivalent-of-CPLogInvestigator-for-
Log-Volume-and/td-p/46792
VPN Commands
The commands below have to be used in expert mode and NOT in clish.
In R80+:
Open SmartConsole > Logs & Monitor.
Open the catalog (new tab).
Click Tunnel & User Monitoring.
See also: Logging and Monitoring R80.10 (Part of Check Point Infinity)
VPN IKE Debugging (P1 and P2 GW vpn debug ikeon (enable IKE debug)
Communication) vpn debug ikeoff (disable IKE
The resulting $FWDIR/log/ike.elg debug)
and/or $FWDIR/log/ikev2.xml can
be used in the "IKEView" Utility from
Check Point, see here: sk30994
VSX specific
The commands below have to be used in expert mode and NOT in clish
Example:
# vsx stat -v -l
VSID: 0
VRID: 0
Name: fwvsx01
10:30:11
Connections number: 66
VSID: 1
VRID: 1
Name: fw01p
11:30:39
View state tables for virtual system VSX vsenv <id>; fw tab -t <table>
<id>.
View traffic for virtual system with ID VSX fw monitor -v <id> -e 'accept;'
<id>.
Attention: with fw monitor use -v
instead of -vs.
View HA state of all configured Virtual VSX cphaprob state
Systems.
View HA state for Virtual System ID VSX cphaprob -vs <id> state
<id>.
The mgmt_cli tool is installed as part of Gaia on all R80 gateways and can be used in scripts
running in expert mode.
The mgmt_cli.exe tool is installed as part of the R80 SmartConsole installation (typically under
C:\Program Files (x86)\CheckPoint\SmartConsole\R80\PROGRAM\) and can be copied to run on any
Windows machine.
On Windows you cannot login with a certificate since the mgmt_cli_login is missing, you need to
login with user/password or use the mgmt_cli tool on the management server.
To use the actual ssh login with mgmt_cli use the undocumented feature
mgmt_cli -r true
Show api-settings
Check if clients are allowed to connect to the api and check all the api-settings.
...
...
API Status
To confirm that the API is usable and available remotely, run the api status command. If
Accessibility shows “Require all granted” it means that any system can access the API (on R80 this
will show “Allow all”).
[Expert@awsmgmt:0]# api status
API Settings:
---------------------
Processes:
-------------------------------------------------
CPM Started 14350 Check Point Security Management Server is running and ready
Port Details:
-------------------
--------------------------------------------
--------------------------------------------
API readiness test SUCCESSFUL. The server is up and ready to receive connections
Notes:
------------
API restart
To restart the api process use the following
api restart
logging in
First create a session into a file and reuse it:
mgmt_cli -s id.txt show objects filter "192.168.1.1" ip-only true --format json | jq '.objects[] | {name: .name,
Show Hosts
mgmt_cli -s id.txt show hosts --format json
Output:
"Layer1"
"Layer2"
...
mgmt_cli run-script script-name "ifconfig" script "ifconfig" targets.1 "corporate-gateway" -s id.txt --format json
--format json
Output:
.
} ],
"from" : 1,
"to" : 260,
"total" : 260
Links
http://sicuriconnoi.blogspot.com/2017/11/top-checkpoint-cli-commands.html
e/Content/Topics-CLIG/FWG/stattest.htm
Revision #35
Created 20 October 2020 13:40:45
Updated 21 June 2024 09:59:46 by Peter Baumann