Written for Check Point R82.10 on Gaia, and checked against Check Point's R82 and R82.10 reference guides. Most commands work the same on R81.20 and R82. Each command shows the shell it's typed in: Gaia Clish is the > prompt you get after logging in, and Expert mode is the bash shell (#) you get with expert. Clish changes are lost on reboot until you run save config. mgmt_cli commands run on the management server; the rest run on the gateway. Names, addresses and keys are examples, so swap in your own.

Clish, Expert mode and getting around #

  • Go from Clish to Expert mode (bash)Check Point Gaia · Gaia Clish (>)
    expert
  • Go back to Clish from Expert modeCheck Point Gaia · Expert mode (#)
    exit
  • Run a Clish command from Expert modeCheck Point Gaia · Expert mode (#)
    clish -c "show version all"
  • Set the Expert mode passwordCheck Point Gaia · Gaia Clish (>)
    set expert-password
  • Take the config lock when Clish says someone else has itCheck Point Gaia · Gaia Clish (>)
    lock database override
  • Stop output pausing at the end of each screenCheck Point Gaia · Gaia Clish (>)
    set clienv rows 0
  • Show the Gaia version, kernel and editionCheck Point Gaia · Gaia Clish (>)
    show version all
  • Show the Check Point software versionCheck Point Gaia · Expert mode (#)
    fw ver
  • List installed products and Jumbo hotfixesCheck Point Gaia · Expert mode (#)
    cpinfo -y all
  • Show the whole Gaia config as Clish commandsCheck Point Gaia · Gaia Clish (>)
    show configuration
  • Save the Clish changes so they survive a rebootCheck Point Gaia · Gaia Clish (>)
    save config
  • Save the Gaia config to a file in your home folderCheck Point Gaia · Gaia Clish (>)
    save configuration gaia-config.txt
  • Load Gaia config from a fileCheck Point Gaia · Gaia Clish (>)
    load configuration gaia-config.txt

    Warning: Applies every command in the file. Check it first, then save config.

  • Open the Check Point configuration menu (licences, SIC, products)Check Point Gaia · Expert mode (#)
    cpconfig
  • Run the first-time setup wizard from the command lineCheck Point Gaia · Expert mode (#)
    config_system

Gaia setup #

  • Set the hostnameCheck Point Gaia · Gaia Clish (>)
    set hostname cp-gw1
  • Give an interface an IP addressCheck Point Gaia · Gaia Clish (>)
    set interface eth1 ipv4-address 192.168.10.1 mask-length 24
  • Bring an interface upCheck Point Gaia · Gaia Clish (>)
    set interface eth1 state on
  • Add a description to an interfaceCheck Point Gaia · Gaia Clish (>)
    set interface eth1 comments "Inside LAN"
  • Add a VLAN interfaceCheck Point Gaia · Gaia Clish (>)
    add interface eth1 vlan 10
  • Give a VLAN interface an IP addressCheck Point Gaia · Gaia Clish (>)
    set interface eth1.10 ipv4-address 192.168.10.1 mask-length 24
  • Set the default routeCheck Point Gaia · Gaia Clish (>)
    set static-route default nexthop gateway address 203.0.113.1 on
  • Add a static routeCheck Point Gaia · Gaia Clish (>)
    set static-route 10.20.0.0/16 nexthop gateway address 203.0.113.1 on
  • Remove a static routeCheck Point Gaia · Gaia Clish (>)
    set static-route 10.20.0.0/16 off
  • Set the DNS serverCheck Point Gaia · Gaia Clish (>)
    set dns primary 192.168.10.53
  • Set the NTP serverCheck Point Gaia · Gaia Clish (>)
    set ntp server primary pool.ntp.org version 4
  • Turn NTP onCheck Point Gaia · Gaia Clish (>)
    set ntp active on
  • Show the date, time and time zoneCheck Point Gaia · Gaia Clish (>)
    show clock
  • Add an admin userCheck Point Gaia · Gaia Clish (>)
    add user netadmin uid 0 homedir /home/netadmin
  • Set a user's password (it asks for it)Check Point Gaia · Gaia Clish (>)
    set user netadmin password
  • Give a user the admin roleCheck Point Gaia · Gaia Clish (>)
    add rba user netadmin roles adminRole
  • Make Expert mode a user's login shellCheck Point Gaia · Gaia Clish (>)
    set user netadmin shell /bin/bash
  • Allow SSH and the Gaia Portal from one host onlyCheck Point Gaia · Gaia Clish (>)
    add allowed-client host ipv4-address 192.168.10.50

    Warning: Once you add a host, only listed hosts can connect. Add your own address first, and delete any-host last.

  • List the hosts allowed to connectCheck Point Gaia · Gaia Clish (>)
    show allowed-client all

Interfaces, bonds and routes #

  • Show every interface with its addresses and stateCheck Point Gaia · Gaia Clish (>)
    show interfaces all
  • Show one interfaceCheck Point Gaia · Gaia Clish (>)
    show interface eth1
  • Show interfaces the firewall knows about, with addressesCheck Point Gaia · Expert mode (#)
    fw getifs
  • Show the routing tableCheck Point Gaia · Gaia Clish (>)
    show route
  • Show static routes onlyCheck Point Gaia · Gaia Clish (>)
    show route static
  • Show the routing table in Expert modeCheck Point Gaia · Expert mode (#)
    netstat -rn
  • Show the ARP tableCheck Point Gaia · Gaia Clish (>)
    show arp dynamic all
  • Create a bond (link aggregation)Check Point Gaia · Gaia Clish (>)
    add bonding group 1
  • Add an interface to a bondCheck Point Gaia · Gaia Clish (>)
    add bonding group 1 interface eth1

    Warning: The interface must have no IP address first.

  • Set a bond to LACP (802.3ad)Check Point Gaia · Gaia Clish (>)
    set bonding group 1 mode 8023AD
  • Show a bond's settings and membersCheck Point Gaia · Gaia Clish (>)
    show bonding group 1
  • Show bond status on a cluster memberCheck Point Gaia · Gaia Clish (>)
    show cluster bond all

Status and health #

  • Show the policy installed on the gateway, and whenCheck Point Gaia · Expert mode (#)
    fw stat
  • Show firewall status and countersCheck Point Gaia · Expert mode (#)
    cpstat fw
  • Show CPU useCheck Point Gaia · Expert mode (#)
    cpstat os -f cpu
  • Show memory useCheck Point Gaia · Expert mode (#)
    cpstat os -f memory
  • Show a live dashboard of CPU, traffic and connectionsCheck Point Gaia · Expert mode (#)
    cpview
  • List Check Point processes and how often they've restartedCheck Point Gaia · Expert mode (#)
    cpwd_admin list
  • List the blades turned onCheck Point Gaia · Expert mode (#)
    enabled_blades
  • Show licencesCheck Point Gaia · Expert mode (#)
    cplic print
  • Show SecureXL (acceleration) statusCheck Point Gaia · Expert mode (#)
    fwaccel stat
  • Show how much traffic is acceleratedCheck Point Gaia · Expert mode (#)
    fwaccel stats -s
  • Show CoreXL firewall instances and their connectionsCheck Point Gaia · Expert mode (#)
    fw ctl multik stat
  • Show which CPU cores handle interfaces and instancesCheck Point Gaia · Expert mode (#)
    fw ctl affinity -l
  • Show firewall kernel memory and connection statsCheck Point Gaia · Expert mode (#)
    fw ctl pstat
  • Show disk spaceCheck Point Gaia · Expert mode (#)
    df -h
  • Run the HealthCheck Point testsCheck Point Gaia · Expert mode (#)
    hcp -r all

Policy on the gateway #

  • Reload the last policy the gateway hadCheck Point Gaia · Expert mode (#)
    fw fetch local
  • Fetch the policy from the management serverCheck Point Gaia · Expert mode (#)
    fw fetch 192.168.10.5
  • Remove the policy from the gatewayCheck Point Gaia · Expert mode (#)
    fw unloadlocal

    Warning: Leaves the gateway with no policy, so it stops filtering. Only on a console, and reinstall the policy straight after.

  • Stop Check Point servicesCheck Point Gaia · Expert mode (#)
    cpstop

    Warning: Stops all traffic through the gateway.

  • Start Check Point servicesCheck Point Gaia · Expert mode (#)
    cpstart
  • Restart Check Point servicesCheck Point Gaia · Expert mode (#)
    cprestart

    Warning: Interrupts traffic while services restart.

  • Test which rule a connection would matchCheck Point Gaia · Expert mode (#)
    fw up_execute mode=access in_ifn=eth1 ipp=6 src=192.168.10.25 dst=198.51.100.10 dport=443

Connections and blocking #

  • Count the current connectionsCheck Point Gaia · Expert mode (#)
    fw tab -t connections -s
  • List connections in a readable formatCheck Point Gaia · Expert mode (#)
    fw ctl conntab
  • List connections from one addressCheck Point Gaia · Expert mode (#)
    fw ctl conntab -sip=192.168.10.25
  • List connections to one portCheck Point Gaia · Expert mode (#)
    fw ctl conntab -dport=443
  • Delete the connections from one addressCheck Point Gaia · Expert mode (#)
    fw ctl conntab -x -sip=192.168.10.25

    Warning: Cuts those connections straight away. Check the list without -x first.

  • List accelerated connectionsCheck Point Gaia · Expert mode (#)
    fwaccel conns
  • Block an address for a while and close its connectionsCheck Point Gaia · Expert mode (#)
    fw sam -t 3600 -J src 192.168.10.25
  • Remove that blockCheck Point Gaia · Expert mode (#)
    fw sam -C -J src 192.168.10.25
  • List active blocksCheck Point Gaia · Expert mode (#)
    fw sam -M -J all
  • Remove every blockCheck Point Gaia · Expert mode (#)
    fw sam -D

Packet capture and debugging #

  • Capture traffic to and from an address, accelerated or notCheck Point Gaia · Expert mode (#)
    fw monitor -F "192.168.10.25,0,0,0,0" -F "0,0,192.168.10.25,0,0"
  • Capture traffic between two hosts on one portCheck Point Gaia · Expert mode (#)
    fw monitor -F "192.168.10.25,0,198.51.100.10,443,0" -F "198.51.100.10,443,192.168.10.25,0,0"
  • Save a capture to open in WiresharkCheck Point Gaia · Expert mode (#)
    fw monitor -F "192.168.10.25,0,0,0,0" -F "0,0,192.168.10.25,0,0" -o /var/log/capture.cap
  • Capture on an interface with tcpdumpCheck Point Gaia · Expert mode (#)
    tcpdump -nni eth1 host 192.168.10.25
  • Show dropped packets and whyCheck Point Gaia · Expert mode (#)
    fw ctl zdebug + drop
  • Show drops for one address onlyCheck Point Gaia · Expert mode (#)
    fw ctl zdebug + drop | grep 192.168.10.25
  • Reset kernel debug flags to normalCheck Point Gaia · Expert mode (#)
    fw ctl debug 0
  • Show the order of inspection modulesCheck Point Gaia · Expert mode (#)
    fw ctl chain

ClusterXL #

  • Show cluster members and which is activeCheck Point Gaia · Gaia Clish (>)
    show cluster state
  • Show cluster members and which is active (Expert mode)Check Point Gaia · Expert mode (#)
    cphaprob state
  • Show cluster interfaces and their stateCheck Point Gaia · Expert mode (#)
    cphaprob -a if
  • Show critical devices that are reporting a problemCheck Point Gaia · Gaia Clish (>)
    show cluster members pnotes problem
  • Show all critical devicesCheck Point Gaia · Expert mode (#)
    cphaprob -l list
  • Show state sync statisticsCheck Point Gaia · Expert mode (#)
    cphaprob syncstat
  • Show failover historyCheck Point Gaia · Expert mode (#)
    cphaprob show_failover
  • Check the members run the same softwareCheck Point Gaia · Expert mode (#)
    cphaprob release
  • Fail over by taking this member downCheck Point Gaia · Expert mode (#)
    clusterXL_admin down

    Warning: Moves traffic to another member. Run clusterXL_admin up to bring it back.

  • Bring this member back into the clusterCheck Point Gaia · Expert mode (#)
    clusterXL_admin up

Site-to-site VPN #

  • Open the VPN tunnel menu (list and delete SAs)Check Point Gaia · Expert mode (#)
    vpn tu
  • List VPN tunnels with trafficCheck Point Gaia · Expert mode (#)
    vpn tu tlist
  • List tunnels to one peerCheck Point Gaia · Expert mode (#)
    vpn tu tlist -p 198.51.100.200
  • List IKE SAs for one peerCheck Point Gaia · Expert mode (#)
    vpn tu list peer_ike 198.51.100.200
  • List IPsec SAs for one peerCheck Point Gaia · Expert mode (#)
    vpn tu list peer_ipsec 198.51.100.200
  • Show VPN status and countersCheck Point Gaia · Expert mode (#)
    cpstat vpn
  • Start IKE debugging with fresh log filesCheck Point Gaia · Expert mode (#)
    vpn debug trunc
  • Start IKE debuggingCheck Point Gaia · Expert mode (#)
    vpn debug ikeon
  • Stop VPN debuggingCheck Point Gaia · Expert mode (#)
    vpn debug off
  • Stop IKE debuggingCheck Point Gaia · Expert mode (#)
    vpn debug ikeoff

Management server and the API #

  • Show management server statusCheck Point Gaia · Expert mode (#)
    cpstat mg
  • Check the management API is runningCheck Point Gaia · Expert mode (#)
    api status
  • Restart the management APICheck Point Gaia · Expert mode (#)
    api restart
  • Log in to the API and keep the session in a fileCheck Point Gaia · Expert mode (#)
    mgmt_cli login -r true > id.txt
  • Add a host objectCheck Point Gaia · Expert mode (#)
    mgmt_cli add host name web-server-1 ip-address 192.168.10.1 -s id.txt
  • Publish your changesCheck Point Gaia · Expert mode (#)
    mgmt_cli publish -s id.txt
  • Install a policy package on a gatewayCheck Point Gaia · Expert mode (#)
    mgmt_cli install-policy policy-package "Standard" targets "cp-gw1" -s id.txt
  • Log out of the APICheck Point Gaia · Expert mode (#)
    mgmt_cli logout -s id.txt
  • List gateways and serversCheck Point Gaia · Expert mode (#)
    mgmt_cli -r true show gateways-and-servers
  • Show a rulebase as JSONCheck Point Gaia · Expert mode (#)
    mgmt_cli -r true show access-rulebase name "Network" --format json
  • Find where an object is usedCheck Point Gaia · Expert mode (#)
    mgmt_cli -r true where-used name web-server-1
  • Show the SIC trust state on a gatewayCheck Point Gaia · Expert mode (#)
    cp_conf sic state
  • Reset SIC on a gateway with a new activation keyCheck Point Gaia · Expert mode (#)
    cp_conf sic init MyOneTimeKey

    Warning: Breaks trust with the management server until you reset SIC on the gateway object in SmartConsole with the same key.

  • Export the management database for a migrationCheck Point Gaia · Expert mode (#)
    $FWDIR/scripts/migrate_server export -v R82.10 /var/log/mgmt-export.tgz

Upgrades and hotfixes (CPUSE) #

  • Check for new packagesCheck Point Gaia · Gaia Clish (>)
    installer check-for-updates
  • List packages you can downloadCheck Point Gaia · Gaia Clish (>)
    show installer packages available-for-download
  • List installed packagesCheck Point Gaia · Gaia Clish (>)
    show installer packages installed
  • Download a package by its numberCheck Point Gaia · Gaia Clish (>)
    installer download 1
  • Import a package you copied to the gatewayCheck Point Gaia · Gaia Clish (>)
    installer import local /var/log/upload/Check_Point_R82_10_JUMBO_HF_Bundle_FULL.tgz
  • List imported packagesCheck Point Gaia · Gaia Clish (>)
    show installer packages imported
  • Check a package can be installedCheck Point Gaia · Gaia Clish (>)
    installer verify 1
  • Install a packageCheck Point Gaia · Gaia Clish (>)
    installer install 1

    Warning: Most packages reboot the gateway. On a cluster, do one member at a time.

  • Upgrade to a new major versionCheck Point Gaia · Gaia Clish (>)
    installer upgrade 1

    Warning: Reboots the gateway. Take a backup first, and upgrade the management server before its gateways.

  • Uninstall a packageCheck Point Gaia · Gaia Clish (>)
    installer uninstall 1

Backups and snapshots #

  • Back up the system to the gatewayCheck Point Gaia · Gaia Clish (>)
    add backup local
  • Back up the system to an SCP serverCheck Point Gaia · Gaia Clish (>)
    add backup scp ip 192.168.10.60 path /backups/ username backup interactive
  • Show backup progressCheck Point Gaia · Gaia Clish (>)
    show backup status
  • List backupsCheck Point Gaia · Gaia Clish (>)
    show backups
  • Take a snapshot of the whole system and save it as a fileCheck Point Gaia · Gaia Clish (>)
    add snapshot-onetime name before-upgrade description "Inside LAN" target local path /var/log/
  • Show a snapshot's date, description and sizeCheck Point Gaia · Gaia Clish (>)
    show snapshot before-upgrade all

Troubleshooting #

  • Ping from the gatewayCheck Point Gaia · Gaia Clish (>)
    ping 198.51.100.10
  • Trace the route to a hostCheck Point Gaia · Gaia Clish (>)
    traceroute 198.51.100.10
  • Show the system log as it's writtenCheck Point Gaia · Expert mode (#)
    tail -f /var/log/messages
  • Show the firewall daemon logCheck Point Gaia · Expert mode (#)
    tail -f $FWDIR/log/fwd.elg
  • Show the busiest processesCheck Point Gaia · Expert mode (#)
    top
  • Collect diagnostics for Check Point supportCheck Point Gaia · Expert mode (#)
    cpinfo -z -o /var/log/cpinfo-gw1.info
  • List the log files on this machineCheck Point Gaia · Expert mode (#)
    fw lslogs