【Check Point R81】各種確認コマンドまとめ

ファイアウォール(UTM)

作業環境

  • Check Point R81
    • VMware Player 上の仮想マシンとして Gaia をインストール

コンフィグ関連

  • show configuration
    • Gaia のコンフィグを表示
    • ※FWポリシー・オブジェクトなどは対象外

C81-GW01> show configuration
#
# Configuration of C81-GW01
# Language version: 14.0v1
#
# Exported by admin on Tue Jun 22 11:49:47 2021
#
set installer policy check-for-updates-period 3
set installer policy periodically-self-update on
set installer policy auto-compress-snapshot on
set installer policy self-test install-policy off
set installer policy self-test network-link-up off
set installer policy self-test start-processes on
set arp table cache-size 4096
set arp table validity-timeout 60
set arp announce 2
set ip-conflicts-monitor state off
set message banner on

set message motd off
.
.
.

システム関連

バージョン

  • show version all
  • ver
    • Gaia OS のバージョン情報を表示。どちらも同じ出力内容
C81-GW01> show version all
Product version Check Point Gaia R81
OS build 392
OS kernel version 3.10.0-957.21.3cpx86_64
OS edition 64-bit

  • fw ver -k
    • FW ソフトウェアのバージョン情報を表示
C81-GW01> fw ver -k
This is Check Point's software version R81 - Build 010
kernel: R81 - Build 006

ライセンス

  • show license status
  • cplic print
    • ライセンス情報を表示。どちらも同じ出力内容
C81-GW01> cplic print
Host             Expiration  Features



======================================================================
 Check Point product trial period will expire in 11 days.
 Until then, you will be able to use the complete Check Point Product Suite.
 Please obtain a permanent license from Check Point User Center at:
 https://usercenter.checkpoint.com/pub/usercenter/get_started.html
======================================================================

パッケージ適用状況

  • cpinfo -y all
    • 適用されているパッケージ一覧を表示
CP81-MNG> cpinfo -y all

This is Check Point CPinfo Build 914000214 for GAIA
[IDA]
        No hotfixes..

[MGMT]
        No hotfixes..

[CPFC]
        No hotfixes..

[FW1]
        HOTFIX_GOT_MGMT_AUTOUPDATE
        HOTFIX_GOT_TPCONF_MGMT_AUTOUPDATE

FW1 build number:
This is Check Point Security Management Server R81 - Build 287
This is Check Point's software version R81 - Build 959

[SecurePlatform]
        No hotfixes..

[CPinfo]
        No hotfixes..

[AutoUpdater]
        No hotfixes..

[DIAG]
        No hotfixes..

[Reporting Module]
        No hotfixes..

[CPuepm]
        No hotfixes..

[VSEC]
        No hotfixes..

[SmartLog]
        No hotfixes..

[R7520CMP]
        No hotfixes..

[R7540CMP]
        No hotfixes..

[R76CMP]
        No hotfixes..

[SFWR77CMP]
        No hotfixes..

[SFWR80CMP]
        No hotfixes..

[R77CMP]
        No hotfixes..

[R8040CMP]
        No hotfixes..

[R75CMP]
        No hotfixes..

[FLICMP]
        No hotfixes..

[MGMTAPI]
        No hotfixes..

[CPUpdates]
        BUNDLE_INFRA_AUTOUPDATE Take:  44
        BUNDLE_DC_CONTENT_AUTOUPDATE    Take:  9
        BUNDLE_DEP_INSTALLER_AUTOUPDATE Take:  23
        BUNDLE_GOT_MGMT_AUTOUPDATE      Take:  91
        BUNDLE_DC_INFRA_AUTOUPDATE      Take:  26
        BUNDLE_GOT_TPCONF_MGMT_AUTOUPDATE       Take:  32

[CPDepInst]
        No hotfixes..

[itp_wrapper]
        HOTFIX_GOT_MGMT_AUTOUPDATE

CPUSE(Gaia Deployment Agent)

  • show installer policy
    • アップデートポリシーに関する各種設定状況を表示
C81-GW01> show installer policy
Check for updates period:                         3 hours
Download Hotfixes:                                manual
Major installation auto compress snapshots:       on
Periodically update new Deployment agent:         on
Self tests - perform install policy:              off
Self tests - perform network link up:             off
Self tests - perform start Check Point processes: on

  • show installer status
    • Gaia Deployment Agent のビルドナンバー等の状態を表示
C81-GW01> show installer status
Agent:              Enabled
Build number:       2084 (agent build is up to date)
Network connection: Could not connect to the Check Point Cloud. Check your connection settings (Default Gateway, DNS and Proxy)
Update from cloud:  Last updated on Tue Aug  13 11:23:12 2021
License:            Valid

ユーザ

  • show users
    • 管理ユーザ情報を表示
C81-GW01> show users
User             Uid       Gid       Home Dir.        Shell            Real Name                                 Privileges
admin            0         0         /home/admin      /etc/cli.sh      Admin                                     Access to Expert features
monitor          102       100       /home/monitor    /etc/cli.sh      Monitor                                   None

時刻・NTP

  • show clock
    • 現在時刻を表示
C81-GW01> show clock
Tue Jun 21 21:55:41 2021 JST

  • show timezone
    • タイムゾーンを表示
C81-GW01> Time Zone: Asia/Tokyo (GMT +09:00)

  • show ntp servers
    • NTP サーバ設定を表示
C81-GW01> show ntp servers
IP Address               Type              Version
ntp2.checkpoint.com      Secondary         4
ntp.checkpoint.com       Primary           4

  • show ntp current
    • NTP サーバとの同期状態を表示
    • 同期できている場合は NTP サーバの IP アドレスが表示される
C81-GW01> show ntp current
primary and secondary servers are not synchronized

DNS

  • show dns
    • DNS サーバ設定を表示
C81-GW01> show dns

DNS setup
Name                  Value

Mode                  default
Domain
DNS server            8.8.8.8
DNS server
DNS server

SNMP

  • show snmp communities
    • SNMP コミュニティを表示
C81-GW01> show snmp communities
Community hogehoge
Permissions read-only

  • show snmp agent
  • show snmp agent-version
    • SNMP エージェント情報を表示
C81-GW01> show show snmp agent
SNMP Agent Enabled

C81-GW01> show snmp agent-version
v1/v2/v3

  • show snmp traps receivers
    • SNMP トラップレシーバ情報(トラップ送信先)を表示
C81-GW01> show snmp traps receivers
Trap Receiver 192.168.200.1
Version v2
Community hogehoge

  • show snmp traps enabled-traps
    • 有効な SNMP トラップを表示
C81-GW01> show snmp traps enabled-traps
linkUpLinkDown

Syslog

  • show syslog all
    • Syslog 設定を表示
C81-GW01> show syslog all
Syslog Parameters:
    Remote Address 192.168.200.1
        Levels all
    Auditlog permanent
    Destination Log Filename /var/log/messages

その他

  • show allowed-client all
    • 管理アクセス許可ホストを表示
C81-GW01> show allowed-client all
Type                  Address                                   Mask Length

Host                  Any

ハードウェア関連

  • show asset all
    • 型番、シリアル番号、CPU、ディスク、メモリ情報などを表示
    • 仮想アプライアンスで実行した場合は得られる情報は CPU 情報くらい
  • show sysenv all
    • BIOS、ファン、電源、温度、電圧の情報を表示
    • 仮想アプライアンスで実行した場合は何も情報は得られない
  • show system disk usage
    • ディスク使用状況を表示
C81-GW01> show system disk usage
Filesystem                       Size  Used Avail Use% Mounted on
/dev/mapper/vg_splat-lv_current   20G  6.5G   14G  33% /
/dev/sda1                        291M   27M  249M  10% /boot
tmpfs                            1.8G  5.4M  1.8G   1% /dev/shm
/dev/mapper/vg_splat-lv_log       20G  605M   20G   3% /var/log

  • show system memory status
    • メモリと CPU の使用状況を表示
C81-GW01> show system memory status
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  0      0 859780   1764 1789672    0    0   199    55  450  621  2  4 93  1  0

  • top
    • メモリと CPU の使用状況およびプロセス毎の使用状況をリアルタイムに表示
    • 使い方は Linux の top コマンドと同様
C81-GW01> top

top - 12:07:30 up  1:52,  1 user,  load average: 0.46, 0.28, 0.25
Tasks: 169 total,   2 running, 167 sleeping,   0 stopped,   0 zombie
%Cpu0  :  3.0 us,  4.0 sy,  0.0 ni, 91.9 id,  0.0 wa,  0.0 hi,  1.0 si,  0.0 st
%Cpu1  :  1.0 us,  1.0 sy,  0.0 ni, 96.1 id,  0.0 wa,  1.0 hi,  1.0 si,  0.0 st
KiB Mem :  3749728 total,   859072 free,  1099100 used,  1791556 buff/cache
KiB Swap:  8088720 total,  8088720 free,        0 used.  2051944 avail Mem

   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ P COMMAND
 17173 admin      0 -20 1636096 435584 102140 S   4.0 11.6   3:55.08 1 fwk0_dev_0
 16832 admin     20   0   29440   2216   1528 S   1.0  0.1   0:12.50 0 redis-server
     1 admin     20   0    2628    712    604 S   0.0  0.0   0:01.01 1 init
     2 admin     20   0       0      0      0 S   0.0  0.0   0:00.01 1 kthreadd
     3 admin     20   0       0      0      0 S   0.0  0.0   0:00.92 0 ksoftirqd/0
.
.
.

インターフェース関連

  • show interface <IF名>
  • show interfaces all
    • インターフェース情報を表示
C81-GW01> show interfaces all
Interface eth0
    state on
    mac-addr 00:0c:29:e2:53:dd
    type ethernet
    link-state link up
    mtu 1500
    auto-negotiation on
    speed 1000M
    ipv6-autoconfig Not configured
    duplex full
    monitor-mode off
    link-speed 1000M/full
    comments
    ipv4-address 192.168.200.41/24
    ipv6-address Not Configured
    ipv6-local-link-address Not Configured

Statistics:
    TX bytes:130997376 packets:241244 errors:0 dropped:0 overruns:0 carrier:0
    RX bytes:29239045 packets:249232 errors:0 dropped:612 overruns:0 frame:0


Interface eth1
.
.
.

  • show management interface
    • 管理インターフェースを表示
C81-GW01> show management interface
eth1

ポリシー関連

  • show security-gateway policy details
    • ポリシーステータスを表示
    • GW でこのコマンドを実行することでインストールされているポリシーパッケージを確認できる
      • 以下の例だと Policy 列の値から Standard がインストールされていることが分かる
C81-GW01> show security-gateway policy details

HOST       IF     POLICY           DATE                TOTAL REJECT   DROP ACCEPT    LOG
localhost >eth0 Standard         22Jun2021 11:03:04 :  233361      0    850 232511      0
localhost <eth0 Standard         22Jun2021 11:03:04 :  232815      0      0 232815      0
localhost >eth1 Standard         22Jun2021 11:03:04 :   14237      0    589  13648      2
localhost <eth1 Standard         22Jun2021 11:03:04 :   19410      0      0  19410      0
localhost >eth2 Standard         22Jun2021 11:03:04 :     197      0     92    105      0
localhost <eth2 Standard         22Jun2021 11:03:04 :       3      0      0      3      0

ルーティング関連

  • show route all
    • ルーティングテーブルを表示
C81-GW01> show route all
Codes: C - Connected, S - Static, R - RIP, B - BGP (D - Default),
       O - OSPF IntraArea (IA - InterArea, E - External, N - NSSA),
       A - Aggregate, K - Kernel Remnant, H - Hidden, P - Suppressed,
       NP - NAT Pool, U - Unreachable, i - Inactive

S               0.0.0.0/0           via 10.1.10.1, eth1, cost 0, age 7300
C               10.1.10.0/24        is directly connected, eth1
C               127.0.0.0/8         is directly connected, lo
C               192.168.75.0/24     is directly connected, eth2
C               192.168.200.0/24    is directly connected, eth0

  • show arp dynamic all
    • arp テーブルを表示
C81-GW01> show arp dynamic all
Dynamic Arp Parameters

IP Address                 Mac Address
10.1.10.4               84:af:ec:74:b8:6f
192.168.200.1           00:50:56:c0:00:01
10.128.128.128          ac:17:c8:5b:4d:65
10.1.10.1               00:09:0f:09:00:03
192.168.75.42           00:0c:29:a2:82:39
192.168.200.40          00:0c:29:e9:b5:b8

SIC 証明書の確認

Security Management でのコマンド

  • cpca_client lscert -kind SIC
    • SIC 証明書一覧の表示
[Expert@R81-MNG:0]# cpca_client lscert -kind SIC
Operation succeeded. rc=0.
6 certs found.

Subject = CN=cp_mgmt,O=R81-MNG..5zp2rr
Status = Valid   Kind = SIC   Serial = 11730   DP = 0
Not_Before: Wed Aug  4 16:38:14 2021   Not_After: Tue Aug  4 16:38:14 2026

Subject = CN=cp_mgmt,O=R81-MNG..5zp2rr
Status = Valid   Kind = SIC   Serial = 63809   DP = 0
Not_Before: Wed Aug  4 16:38:08 2021   Not_After: Tue Aug  4 16:38:08 2026

Subject = CN=R81-GW01,O=R81-MNG..5zp2rr
Status = Revoked   Kind = SIC   Serial = 73363   DP = 0
Not_Before: Wed Aug  4 19:11:53 2021   Not_After: Tue Aug  4 19:11:53 2026

Subject = CN=cp_mgmt,O=R81-MNG..5zp2rr
Status = Valid   Kind = SIC   Serial = 74164   DP = 0
Not_Before: Wed Aug  4 16:37:51 2021   Not_After: Tue Aug  4 16:37:51 2026

Subject = CN=R81-GW01,O=R81-MNG..5zp2rr
Status = Valid   Kind = SIC   Serial = 85249   DP = 0
Not_Before: Wed Aug  4 19:12:10 2021   Not_After: Tue Aug  4 19:12:10 2026

Subject = CN=R81-MNG,O=R81-MNG..5zp2rr
Status = Valid   Kind = SIC   Serial = 87030   DP = 0
Not_Before: Wed Aug  4 16:37:59 2021   Not_After: Tue Aug  4 16:37:59 2026

  • cpca_client lscert -stat Valid -kind SIC
    • 現在有効な SIC 証明書一覧の表示
[Expert@R81-MNG:0]# cpca_client lscert -stat Valid -kind SIC
Operation succeeded. rc=0.
5 certs found.

Subject = CN=cp_mgmt,O=R81-MNG..5zp2rr
Status = Valid   Kind = SIC   Serial = 11730   DP = 0
Not_Before: Wed Aug  4 16:38:14 2021   Not_After: Tue Aug  4 16:38:14 2026

Subject = CN=cp_mgmt,O=R81-MNG..5zp2rr
Status = Valid   Kind = SIC   Serial = 63809   DP = 0
Not_Before: Wed Aug  4 16:38:08 2021   Not_After: Tue Aug  4 16:38:08 2026

Subject = CN=cp_mgmt,O=R81-MNG..5zp2rr
Status = Valid   Kind = SIC   Serial = 74164   DP = 0
Not_Before: Wed Aug  4 16:37:51 2021   Not_After: Tue Aug  4 16:37:51 2026

Subject = CN=R81-GW01,O=R81-MNG..5zp2rr
Status = Valid   Kind = SIC   Serial = 85249   DP = 0
Not_Before: Wed Aug  4 19:12:10 2021   Not_After: Tue Aug  4 19:12:10 2026

Subject = CN=R81-MNG,O=R81-MNG..5zp2rr
Status = Valid   Kind = SIC   Serial = 87030   DP = 0
Not_Before: Wed Aug  4 16:37:59 2021   Not_After: Tue Aug  4 16:37:59 2026

ログ関連

ログファイルを確認する

各ログファイルは Linux OS と同様に /var/log ディレクトリに格納されています。

システムログは /var/log/messages に記録されているため、この内容を見ることでシステムログを確認できます。
※ ログの保存先ファイルは Gaia の設定で変更することも可能

[Expert@C81-GW01:0]# tail /var/log/messages
Jun 22 11:41:07 2021 C81-GW01 clish[46768]: cmd by admin: Processing : lock database override  (cmd md5: 31bc69e92d91087bd6055d772f2907b8)
Jun 22 11:41:08 2021 C81-GW01 clish[46768]: cmd by admin: Start executing : set expert-password  (cmd md5: acb919fbbe25d6ed7172913f2381fc3f)
Jun 22 11:41:08 2021 C81-GW01 clish[46768]: cmd by admin: Processing : set expert-password (cmd md5: acb919fbbe25d6ed7172913f2381fc3f)
Jun 22 11:41:15 2021 C81-GW01 clish[46768]: cmd by admin: Start executing : save config  (cmd md5: de1e42791fa5e8e3f5732582509dda4e)
Jun 22 11:41:15 2021 C81-GW01 clish[46768]: cmd by admin: Processing : save config (cmd md5: de1e42791fa5e8e3f5732582509dda4e)
Jun 22 11:41:17 2021 C81-GW01 clish[46768]: cmd by admin: Start executing : expert   (cmd md5: 7b9caddb81a5210c1b3b4331aae3cb12)
Jun 22 11:41:17 2021 C81-GW01 clish[46768]: cmd by admin: Processing : expert  (cmd md5: 7b9caddb81a5210c1b3b4331aae3cb12)
Jun 22 11:41:23 2021 C81-GW01 clish[46768]: cmd by admin: Start executing : ex  (cmd md5: 54d54a126a783bc9cba8c06137136943)
Jun 22 11:41:24 2021 C81-GW01 clish[46768]: cmd by admin: Start executing : expert   (cmd md5: 7b9caddb81a5210c1b3b4331aae3cb12)
Jun 22 11:41:24 2021 C81-GW01 clish[46768]: cmd by admin: Processing : expert  (cmd md5: 7b9caddb81a5210c1b3b4331aae3cb12)

CPinfo

障害時、不具合時の切り分けのためのサポートログを取得できます。ローカルにログファイルを生成し、TFTP などで送信して取得します。

Clish で cpinfo コマンドを実行するとサポートログを取得できます。

コマンドを実行すると、まず以下のように Check Point アカウント情報の入力が求められますが、何も入力せずに Enter を押下していくと、3 回失敗後にこのステップがスキップされます。

C81-GW01> cpinfo

This is Check Point CPinfo Build 914000214 for GAIA
Checking for updates...

                Updating...

No valid CK found. Username and password are needed
Enter your User Center username:
Password:

次に、以下のように CPinfo で生成したファイルをクラウドの Check Point Download Center にアップロードしたいか聞かれますが、[n] を押下してキャンセルします。

Enter your User Center username:
Password:
Invalid username format.
Maximum retry count exceeded
CPinfo update failed, using existing package

Would you like to upload CPinfo file securely to Check Point Download Center? y/n: [y]n

するとログファイル生成が開始されるため、完了まで待ちます。

Would you like to upload CPinfo file securely to Check Point Download Center? y/n: [y]n

                CPinfo Creation...

ログファイル生成が完了すると、再度生成したファイルをクラウドの Check Point Download Center にアップロードしたいか聞かれますが、[n] を押下してキャンセルします。

Collecting information...: 100%

Found new user mode core dumps:
AutoUpdater.18177.core.gz created 18 Jun 08:19
Upload them to Check Point? y/n: [y]n

CPinfo file created locally - C81-GW01_22_6_2021_11_31.info
Done
C81-GW01>

これで、ローカルにログファイルが出力されました。出力先はカレントディレクトリです。

[Expert@C81-GW01:0]# pwd
/home/admin
[Expert@C81-GW01:0]#
[Expert@C81-GW01:0]# ls -l
total 70960
-rw-r--r-- 1 admin root 72657549 Jun 22 11:33 C81-GW01_22_6_2021_11_31.info
-rw-r--r-- 1 admin root       69 Jun 18 08:19 last_dump.log

C81-GW01_22_6_2021_11_31.info が出力されたファイルです。(ファイル名にはホスト名と日付が入ります)

物理アプライアンスでの cpinfo

上の例は仮想アプライアンスで実行したものですが、インターネット接続性が無い環境の物理アプライアンスにて cpinfo コマンド実行したところ、cpinfo の更新チェックが失敗した時点で処理が中止されてしまうことを確認しています。

インターネット接続性のない環境で cpinfo を実行するためには以下のようにオプションを指定した形で実行します。

  • cpinfo -z -d -D -i -o <filename>.info
    • -z → CPInfoを圧縮します
    • -d → CPInfoの更新をチェックしない
    • -D → チェックポイントにファイルをアップロードしない
    • -o → ファイルに出力
    • <filename> → CPInfo ファイルの名前を指定

参考資料

Support, Support Requests, Training, Documentation, and Knowledge base for Check Point products and services

タイトルとURLをコピーしました