UTM 日志触发器
UTM 日志触发器
重要
该功能在 7.2.0 及以上版本支持。
简介
FortiGate 可以配置 UTM 日志作为自动化的触发器(Trigger),在发生特定 UTM 日志 ID 时触发。配置时可以选择多个 UTM 日志 ID,还可以自定义日志字段筛选器。UTM 日志触发器可以从“Security Fabric → 自动化 → 触发”页面进行配置。
重要
每个自动化工作流最多可以配置 16 个 UTM 日志 ID 作为触发器(Trigger)。
UTM 日志触发器支持以下安全事件日志,且可以指定基于 VDOM 的安全事件日志:
- 异常日志(Anomaly)
- 入侵防御日志(IPS)
- SSH 日志
- 反病毒日志(AV)
- 流量阻断日志(Traffic violations,被防火墙策略阻断的流量日志)
- Web 过滤(Web Filter)
CLI 配置方法
config system automation-trigger
edit "Anomaly Logs"
set trigger-type event-based
set event-type anomaly-logs
set vdom <name>
next
edit "IPS Logs"
set trigger-type event-based
set event-type ips-logs
set vdom <name>
next
edit "SSH Logs"
set trigger-type event-based
set event-type ssh-logs
set vdom <name>
next
edit "Traffic Violation"
set trigger-type event-based
set event-type traffic-violation
set vdom <name>
next
edit "Virus Logs"
set trigger-type event-based
set event-type virus-logs
set vdom <name>
next
edit "Webfilter Violation"
set trigger-type event-based
set event-type webfilter-violation
set vdom <name>
next
end网络需求
FortiGate 的 VDOM2 在遭受 DoS 攻击后,自动发送邮件到指定邮箱。
配置举例
进入 FortiGate 全局 VDOM 的 Security Fabric → 自动化页面,新建自动化工作流。

点击添加触发器按钮,在弹出的条目中选择新建。

在弹出的日志类型列表中,选择 Event Log 分类的异常日志。

配置触发器名称,并配置 VDOM 作为触发条件,这里以 VDOM2 为例,也可以选择多个 VDOM,下发配置。

config system global config system automation-trigger edit "Anomaly_Log" set event-type anomaly-logs set vdom "VDOM2" next end选择上步创建的触发器作为触发条件,也可以创建并选择多个触发器。

点击添加动作按钮,并在弹出的条目窗口中点击新建按钮。

在通知分类中选择 Email 类型的动作。

添加触发器与动作之间的延迟为 3s,点击确认下发工作流配置。

config system global config system automation-action edit "Action_Email" set action-type email set email-to "bbai@fortinet.com" set email-from "DoNotReply@notification.fortinet.net" set email-subject "CSF stitch alert" set replacement-message enable next end
config system global config system automation-stitch edit "VDOM2_Trigger_Anomaly_Log" set trigger "Anomaly_Log" config actions edit 1 set action "Action_Email" set delay 3 set required enable next end next end
配置验证
在 FortiGate 的 VDOM2 中配置 DoS 策略,并开启异常日志记录,从终端对 FortiGate 的 VDOM2 接口 port2 发起 DoS 攻击,在日志 & 报表 → 安全事件中的异常分类中,可以看到产生了 UDP Flood 日志。

3s 后收件人邮箱收到了 CSF 自动化发送的邮件,邮件内容为异常日志的文本。

查看 autod 进程的 debug 信息,可以看到 Email 动作被触发。
FortiGate (global) # diagnose debug application autod -1 FortiGate (global) # diagnose debug enable ...... __action_email_hdl()-181: email action (Action_Email) is called. from:DoNotReply@notification.fortinet.net to:bbai@fortinet.com; subject:CSF stitch alert ......查看该自动化流程的的配置和触发统计。
FortiGate (global) # diagnose test application autod 2 csf: disabled root: no sync connection: connecting version:0 sync time: total stitches activated: 4 stitch: VDOM2_Trigger_Anomaly_Log destinations: all trigger: Anomaly_Log type:anomaly logs field ids: (id:6)vd=VDOM2 local hit: 6 relayed to: 0 relayed from: 0 actions: Action_Email type:email interval:0 delay:3 required:yes subject: CSF stitch alert body: %%log%% sender: DoNotReply@notification.fortinet.net mailto:bbai@fortinet.com;