跳轉到

SmartView Logs

防火牆每天產生海量 Log。會查 Log、看懂 Log,是排錯與資安調查的核心技能。Check Point 的 Log 集中在 Management(或專用 Log Server),用 Logs & Monitor 檢視。

Log 從哪來、存哪

graph LR
    GW[Gateway 產生 Log] -->|加密傳送| MGMT[Management / Log Server<br/>SmartEvent 索引]
    MGMT --> VIEW[SmartConsole<br/>Logs & Monitor]
  • Gateway 把連線 / 威脅事件送到 Management(或獨立 Log Server)。
  • 在 SmartConsole 的 Logs & Monitor 分頁查詢、做視覺化。

查詢語法(Log Query)

Logs & Monitor 的搜尋列支援欄位式查詢,比亂翻快得多:

# 基本:直接打 IP / 字串
172.27.67.16

# 欄位查詢
src:10.0.0.5                     # 來源 IP
dst:8.8.8.8                      # 目的 IP
action:Drop                      # 動作
service:https                    # 服務
blade:"Application Control"       # 哪個 Blade 產生
rule:15                          # 命中規則編號

# 組合(and / or / not)
src:10.0.0.5 and action:Drop
blade:IPS and severity:High

排錯先查『被誰擋』

連不通時,用 src:<來源> dst:<目的> action:Drop,點開那筆 Log 會直接告訴你命中哪一條規則、哪個 Blade 擋的。這比猜規則快太多。

常見 Track(記錄等級)

在規則的 Track 欄位設定:

  • None:不記(不建議用在重要規則)。
  • Log:記一筆連線。
  • Detailed / Extended Log:含更多應用層資訊(App、URL、檔案名等)。
  • Account:含流量位元組統計。

Cleanup Rule 一定要記 Log

若被「隱含丟棄」擋掉(沒寫 Cleanup Rule),預設不記 Log,事後查無紀錄。務必在規則庫尾端放 Any/Any/Drop + Log 的 Cleanup Rule。見 Access Control Policy

SmartEvent(事件關聯與報表)

啟用 SmartEvent 後,Management 會把零散 Log 關聯成「事件」並做統計、產生資安報表(Top 攻擊、Top 來源、合規報表等),適合給主管 / 稽核看。

CLI 看 Log

# 讀本機 log 檔($FWDIR/log/fw.log)
fw log                       # 讀本機 fw.log
fw log -f -n                 # 持續監看(tail)、不做 DNS 反解
fw log -t                    # 只看新進條目(不顯示既有)
fw log -c drop               # 只看指定動作(accept/drop/reject/encrypt...)
fw log -h <Gateway IP>       # 只看指定來源 Gateway 的 log
fw log -s "<起>" -e "<迄>"    # 時間區間

# Management 上把 log 匯成文字表格(餵給其他工具分析)
fwm logexport -i $FWDIR/log/fw.log -o /var/log/export.txt -n -p
#   -n 不反解 IP、-p 不解析 port、-m initial|semi|raw 控制 unification

Log 檔與稽核檔

  • 連線 / 流量 Log:$FWDIR/log/*.log(含索引 .logptr 等)
  • 稽核 Log(誰改了設定):$FWDIR/log/*.adtlog

升級時 Log 遷移上限

R81.20 起,升級 Management / Log Server 時,預設只遷移過去 180 天的 Log(可調 30–360 天)。要保留更舊的 Log 記得另外處理。

版本提醒

Logs & Monitor 與查詢語法在 R81.10 ~ R82.10 一致。R82 起 Log 查詢效能、SmartEvent 關聯與 Infinity / XDR 的整合持續強化;大量 Log 環境建議用獨立 Log Server 分擔 Management 負載。

小結

  • Log 集中在 Management / Log Server,用 SmartConsole 的 Logs & Monitor 查。
  • 善用欄位查詢(src: dst: action: blade: rule:)快速定位。
  • 排錯先查 action:Drop 看命中哪條規則。
  • 重要規則與 Cleanup Rule 一定要記 Log。