Fortinet FortiGate 實戰課程

階段二:安全防護與連接 - 6. 安全織網 (Security Fabric)

一、核心概念 (Concept)

什麼是 Security Fabric?

Security Fabric (安全織網) 是 Fortinet 的核心防禦架構,它不是單一設備的功能,而是一個「聯防生態系統」。它讓網路中所有的節點(防火牆、交換器、AP、終端防毒軟體)能夠互相「看見」彼此,並即時交換威脅情資,實現自動化聯防。

生活化比喻:大樓保全聯防系統

想像傳統網路就像是「各自為政」的保全。大門口的警衛(防火牆)看到小偷,但他無法通知電梯(Switch)鎖住樓層,也無法叫住戶的門鎖(Endpoint)自動上鎖。

Security Fabric 就像是「整合型智慧保全系統」:
當大門口的監視器發現通緝犯(偵測到威脅),系統會立刻通知電梯「停用該人門禁卡」(Switch 封鎖 Port),並同時廣播給所有住戶「鎖好門窗」(更新病毒碼)。所有設備共享情報,牽一髮而動全身。

二、運作原理 (Mechanism)

技術架構與關鍵協定

1. 角色階層 (Hierarchy)

  • Root FortiGate (根防火牆): Fabric 的大腦,通常是網路出口最強大的那台 FortiGate。它負責收集所有資訊、計算拓撲圖,並與 FortiGuard 雲端同步。
  • Downstream FortiGate (下游防火牆): 內網或分支機構的防火牆,會向 Root 回報資訊。
  • Fabric Agent (延伸設備): 透過專有協定連接的設備,如 FortiSwitch、FortiAP、FortiClient EMS。

2. 通訊協定 (Protocols)

Fabric 成員之間主要透過 FortiTelemetry 進行溝通。

關鍵參數與設定:

  • FortiTelemetry Port: 預設使用 TCP/8013 進行情資交換。
  • CAPWAP: 用於管理 FortiAP (UDP/5246, 5247)。
  • FortiLink: 專用介面,用於管理 FortiSwitch (基於 CAPWAP 擴充)。
  • 授權同步: Root FG 可以協助將特定授權下發給下游設備。

3. 自動化回應 (Automation Stitches)

這是 Fabric 的「肌肉」。邏輯為:Trigger (觸發條件) + Action (執行動作)
例如:「當 IPS 偵測到高風險攻擊 (Trigger)」➜「將來源 IP 加入黑名單 (Action)」。

三、架構視覺化 (Visuals)

1. Security Fabric 拓撲視圖

展示 Root FG 如何統一管理下游設備與存取層。(請水平滑動查看完整細節)

%%{init: {'theme': 'base', 'themeVariables': { 'fontSize': '18px', 'fontFamily': 'Noto Sans TC'}}}%% flowchart TD Cloud["FortiGuard Cloud
Threat Intel"] --- RootFG subgraph HQ ["Headquarters (總部)"] direction TB RootFG["Root FortiGate
(The Brain)"] CoreSW["FortiSwitch Core"] AccessSW["FortiSwitch Access"] FAP["FortiAP"] PC1["User PC
(FortiClient)"] RootFG -- "FortiLink" --> CoreSW CoreSW -- "FortiLink" --> AccessSW AccessSW -- "CAPWAP" --> FAP AccessSW --> PC1 end subgraph Branch ["Branch (分公司)"] direction TB BranchFG["Downstream FortiGate"] BranchPC["Branch User"] BranchFG --> BranchPC end RootFG -- "IPsec VPN
(FGFM Protocol)" --> BranchFG style RootFG fill:#f56565,stroke:#742a2a,color:white,stroke-width:4px style BranchFG fill:#4299e1,stroke:#2b6cb0,color:white,stroke-width:2px style Cloud fill:#e2e8f0,stroke:#333,stroke-dasharray: 5 5,stroke-width:2px

2. Automation Stitch 自動化封鎖流程

模擬情境:內網電腦中毒,Fabric 自動隔離該電腦。(請水平滑動查看完整細節)

%%{init: {'theme': 'base', 'themeVariables': { 'fontSize': '22px', 'fontFamily': 'Noto Sans TC', 'actorFontSize': '24px', 'noteFontSize': '22px', 'messageFontSize': '22px'}}}%% sequenceDiagram participant Attacker as 外部攻擊者 participant PC as 受駭電腦 (PC) participant FGT as Root FortiGate participant FSW as FortiSwitch Note over PC: 使用者不慎點擊釣魚信件 Attacker->>PC: 嘗試建立 C&C 連線 Note over FGT: 防火牆 IPS/Botnet
引擎偵測到異常流量 PC->>FGT: 異常連線請求 (Malicious Traffic) FGT->>FGT: 觸發 Automation Stitch
(Compromised Host) par 同步阻擋 FGT-->>Attacker: Drop 連線 FGT->>FSW: 下達指令:
Quarantine Port (隔離) end FSW->>PC: 切斷網路存取
(VLAN 切換至隔離區) Note over PC: PC 無法存取內網,
僅能連線至修復伺服器
四、實務應用場景 (Use Case)

案例:企業內網勒索病毒擴散防護

部署情境

一家製造業客戶,產線電腦經常因為 USB 隨身碟感染勒索病毒。傳統架構下,防火牆只能擋住「進出 Internet」的流量,無法阻止同一顆 Switch 下的電腦互相傳染(東西向流量)。

解決方案: 部署 FortiGate + FortiSwitch 啟用 Security Fabric。設定 Automation Stitch,一旦 FortiClient 偵測到病毒,立即通知 FortiGate,聯動 FortiSwitch 將該電腦的實體 Port 隔離。

優缺點分析

優點 (Pros):
  • 可視性全開: 從單一介面 (Root FG) 就能看見所有拓撲與設備狀態。
  • 縮短反應時間: 機器速度 (毫秒級) 隔離威脅,不需要管理員半夜爬起來拔線。
  • 統一管理: 韌體升級、設定變更都可由 Fabric 統一派發。
缺點 (Cons):
  • 廠商綁定 (Vendor Lock-in): 必須全套使用 Fortinet 設備 (Switch, AP) 才能發揮最大效益。
  • 單點依賴: 若 Root FortiGate 掛掉且無 HA,管理視圖會受影響。

實戰設定範例:FortiSwitch 納管連線 (FortiLink)

Root_FortiGate #

# 1. 設定實體介面為 FortiLink 模式

config system interface

edit "port1" // 連接 Switch 的實體介面

set fortilink enable

set allowaccess ping fabric

next

end

# 2. 授權新發現的 FortiSwitch (也可由 GUI 操作)

execute switch-controller get-conn-status // 查看連線狀態

# 假設發現 Switch 序號為 S124D...

config switch-controller managed-switch

edit "S124DPO12345678"

set admin-status up

set fsw-wan1-admin enable

next

end

# 3. 配置 Switch Port VLAN (由 Gate 統一控管)

config switch-controller managed-switch

edit "S124DPO12345678"

config ports

edit "port1"

set vlan "Employee_VLAN"

next

end

next

end

說明:FortiLink 協議允許 FortiGate 直接接管 Switch,將其視為邏輯介面的延伸,所有 VLAN 與 Port 設定皆在防火牆上完成。

實戰設定範例:自動化隔離 (Automation Stitch)

Root_FortiGate #

# 1. 定義自動化觸發條件 (Trigger):偵測到受駭主機

config system automation-trigger

edit "Detect-Compromised-Host"

set event-type compromised-host

next

end

# 2. 定義執行動作 (Action):在 Switch Port 進行隔離

config system automation-action

edit "Quarantine-Port"

set action-type fli-c-quarantine

next

end

# 3. 縫合 (Stitch):將事件與動作綁定

config system automation-stitch

edit "Auto-Block-Infected-PC"

set trigger "Detect-Compromised-Host"

config actions

edit 1

set action "Quarantine-Port"

set required enable

next

end

next

end

註:上述設定會連動 FortiSwitch,將偵測到威脅的 MAC Address 對應的實體 Port 自動切換至隔離 VLAN。

五、隨堂測驗 (Quiz)