Notes Checkpoint CLI Commands
Notes Checkpoint CLI Commands
Notes Checkpoint CLI Commands
Useful Check Point commands. Check Point commands generally come under cp (general) and
fw (firewall)
Useful CP Commands
Command
Description
change SIC, licenses and more
cpconfig
Configuration Options:
---------------------(1) Licenses and contracts
(2) SNMP Extension
(3) PKCS#11 Token
(4) Random Pool
(5) Secure Internal Communication
(6) Disable cluster membership for this gateway
(7) Enable Check Point Per Virtual System State
(8) Enable Check Point ClusterXL for Bridge Active/Standby
(9) Disable Check Point SecureXL
(10) Check Point CoreXL
(11) Automatic start of Check Point Products
(12) Exit
cphaprob ldstat
1 (local) 1.1.1.1
2
1.1.1.2
cphaprob syncstat
100%
0%
Active
Standby
Queues:
Sending queue size............................. 512
Receiving queue size........................... 256
cphastop
cplic print
license information
cpstart
cpstat fw
cpstat ha
cpstat os -f all
cpstat os -f cpu
cpstat os -f routing
cpstop
cpwd_admin
monitor_list
Useful FW Commands
Command
Description
show interface names
fw ctl iflist
fw ctl pstat
fw exportlog -o
fw log
fw log -c drop
fw log -f
fw logswitch
rotate logs
fw lslogs
fw stat
fw stat -l
fw tab
fw tab -s -t connections
fw tab -t xlate -x
fw unloadlocal
fw ver
firewall version
uname -a
Backup
1. Login cli the firewall just command Backup
Login management server via cli command
# cd $FWDIR/bin/upgrade_tools
# ./upgrade_export filename
Example : ./upgrade_export 28_july_15.tgz
To Import
# cd $FWDIR/bin/upgrade_tools
# ./upgrade_import filename
Table 1.
General checkpoint, IPSO commands
Description
ipsctl hw:eeprom:product_id
ipsctl hw:eeprom:serial_number
uname -a
ipsofwd list
net:ip:forward:switch_mode = flowpath
net:ip:forwarding = 1
ipsofwd on username
ipsctl -w net:log:partner:status:debug 1
ipsctl -w net:log:sink:console 0
disable debugging
Table 2.
Firewall Commands
fw ver
vpn macutil
fw stat
fw stat -long
cpstat os -f cpu -o 3
cpstat fw -f all
informations
cpstat fw -f policy
fw tab -t connections -s
fw fetch
cplic print
Print licenses
fwha_mac_magic
Table 3.
Sniffer on the Firewall
fw monitor -m iIoO -e accept (src=IP_S and
dst=_IP_D) or (src=IP_D and dst=IP_S);
Table 4.
Remote Access and S2S VPN
commands
vpn tu
fw tab -t inbound_SPI -f
fw tab -t om_assigned_ips -f
vpn debug on
TDERROR_ALL_ALL=5
vpn debug of
Table 5.
Clustering
commands
cphaprob list
cpstat fw -f sync
cphaprob state
cpstat ha -f all
fw ctl pstat
cphaprob -a if
cphaprob syncstat
fw hastat
Table 6.
General commands
ps -aux
kill -9 prozessid
Stop a process
dmesg
vmstat 5 5
fsck
Filsystemcheck
Table 7.
Administrate CMA/MDS
processes
mdsstop_customer
Stop a CMA
mdsstart_customer
Start a CMA
mdsstat
mdsstop
mdsstart
mdsenv CMANAME
echo $FWDIR
cpstat mg
fwm -a
fwm dbload
Install database
watch -d cpstat os -f
cpu
Table 8.
Searching for objects
cd $FWDIR/conf
grep subdomain objects.C | grep -v Name | awk
{print $2} | grep ^( | sed -e s/(//
cd $FWDIR/conf
grep subdomain /opt/CPmds-R65/customers/*/CPsuiteR65/fw1/conf/objects.C | grep -v Name | awk {print
$1, $3} | grep ( | sed -e s/(//
Table 9.
Archive commands
tar tfv [ARCHIVNAME].tar
open archive
SCP command
scp root@provider1:/opt/CPmdsR65/customers/cma1/CPsuiteR65/fw1/conf/objects_5_0.C .
3. Run cpinfo
# cpinfo -z -n -o /var/mds.cpinfoRequired steps for cpinfo from the relevant CMA
(sk10176)1. List of all Customers (CMAs)
# mdsstat
2. Set the environment for the Customer
# mdsenv CMANAME
3. Verify the correct environment
# echo $FWDIR
/opt/CPmds-R65/customers//CPsuite-R65/fw1/
4. Run cpinfo
# cpinfo -c CMANAME -z -n -o FILENAME
This is an example how to collect the same info (the fw version here) from all of our firewall
with a script.
We need to collect the firewalls with their IPs or with their hostnames in a file I call iplist and
run the srcipt with sh ./get_fwversion.sh
root@myserver # cat get_fwversion.sh
#!/bin/bash
for HOST in $(cat iplist | grep -v "^#" | grep -v "^$")
do
echo $HOST
ssh admin@$HOST 'fw ver'
# Some example. Just delete the # for the required command
# ssh admin@$HOST 'ipsctl hw:eeprom:product_id'
# ssh admin@$HOST 'fwaccel stat'
# ssh admin@$HOST 'clish -c "show vrrp"'
# ssh admin@$HOST 'grep buffer /var/log/messages' | tail -n 2
# ssh admin@$HOST 'grep "Log buffer is full\|log/trap messages"
/var/log/messages'
# ssh admin@$HOST 'cpstat os -f cpu'
done
root@myserver # cat iplist
#R55
myfirewall1
myfirewall2
myfirewall3
myfirewall4
myfirewallcluster1_A
myfirewallcluster1_B
#R60
myfirewall5
myfirewall6
#R65
myfirewall7
myfirewall8
myfirewallcluster2_A
myfirewallcluster2_B
Important Files:
On the Management Server:
$FWDIR/conf/classes.C scheme file. Each object in objects.c, rulebases.fws, fwauth.ndb or
whatever must match one of the classes listed below.
$FWDIR/conf/objects_5_0.C object file.
$FWDIR/conf/rulebases_5_0.fws Rulebase file.
$FWDIR/conf/fwauth.NDB userdatabase
$FWDIR/conf/.W The policy file
$FWDIR/conf/user.def.NGX_FLO User defined inspect code (sk30919)
On the Firewall:
$FWDIR/conf/masters On the firewalls shows who is the management server
$FWDIR/conf/initial_module.pf Initial Policy of the firewall
$FWDIR/conf/discntd.if Add the interface-name in this file to disable monitoring in
fw monitor
Posted on March 5, 2013 by otrdemo Leave a comment
[Show Windows
clock
cpconfig
cphaprob ldstat
cphaprob stat
cphaprob syncstat
cphastop
cplic print
cpstart
cpstat fw
cpstat ha
cpstat os -f all
cpstat os -f cpu
cpstat os -f routing
cpstop
cpwd_admin monitor_list
expert
find / -type f -size 10240k
-exec ls -la {} \;
fw ctl iflist
fw ctl pstat
fw exportlog -o
fw fetch 10.0.0.42
fw log
fw log -b <MMM DD,
YYYY HH:MM:SS>
<MMM DD, YYYY
HH:MM:SS>
fw log -c drop
fw log -f
fwm logexport -i <log
name> -o <output name>
fw logswitch
fw lslogs
fw stat
fw stat -l
fw tab
fw tab -s -t connections
fw tab -t xlate -x
fw unloadlocal
fw ver
fwm lock_admin -h
fwm ver
ifconfig -a
log list
log show <list #>
netstat -an | more
netstat -rn
passwd
ps -ef
sysconfig
upgrade_import
hwclock
fw fetch 10.0.0.42
fw log -f