在 FortiGate/FortiOS 上配置流量导出
FortiGate/FortiOS 从 5.2 及以上版本起支持 NetFlow 流量导出。
要进行 NetFlow 分析,您需要配置设备以将流量导出到 Site24x7 的本地轮询器。本地轮询器作为 NetFlow 采集器,将监听特定端口以接收流量。了解如何查找本地轮询器的端口号。
请按照以下步骤,将设备配置为向已安装 Site24x7 本地轮询器的机器导出 NetFlow 数据包:
config system netflow
set collector-ip <IP address>
set collector-port <0-65535>
set active-flow-timeout <integer. Values 1-60. Default 30>
set inactive-flow-timeout <integer. Values 10-600. Default 15>
set template-tx-timeout <integer. Values 1-1440. Default 30>
set template-tx-counter <integer. Values 10-6000. Default 20>
end
如果使用固件版本 7.2.8、7.4.2 或更高版本,请按如下方式配置 NetFlow:
config system netflow
set active-flow-timeout Timeout to report active flows (60 - 3600 sec, default = 1800).
set inactive-flow-timeout Timeout for periodic report of finished flows (10 - 600 sec, default = 15).
set template-tx-timeout Timeout for periodic template flowset transmission (60 - 86400 sec, default = 1800).
set template-tx-counter Counter of flowset records before resending a template flowset record.
config collectors
edit <table value>
set collector-ip <On-Premise Poller IP address>
set collector-port <NetFlow collector port number>
set source-ip <Source IP address for communication with the NetFlow agent>
set interface-select-method auto
end
end
如果您使用的是 FortiOS v7.6.0 或更高版本,可以配置源接口。
config system netflow
config collectors
edit <id>
set source-ip-interface <interface_name>
next
end
end
请在每个接口上按照以下步骤启用 NetFlow:
config system interface
edit <interface name>
set netflow-sampler bothend
如果是虚拟域概览 (VDOM) 环境,请按如下方式配置设备:
config vdom
edit root (Modify root to the non-management VDOM name as needed.)
config sys vdom-netflow
set vdom-netflow enable (This setting must be enabled before proceeding to the next setting.)
set collector-ip <IP address>
set collector-port 9996
set source-ip <IP address>
end
config system interface
edit wan1 ( Change the interface to the one to be used.)
set netflow-sampler both
end
end
要检查 NetFlow 配置,请在命令行界面模式下使用以下命令:
diagnose test application sflowd 3
diagnose test application sflowd 4
如果按照上述步骤遇到问题,您可以尝试在 Fortigate 防火墙上配置流量导出的步骤。
查看官方文档了解更多信息。
