Hello Zarak Ali,
First of all we would need to know what versions of the components you are trying to integrate.
Fortinet / Firewall Version
Wazuh Version and OS.
Nevertheless, there is a general procedure or background you can follow to achieve this. If this does not work after your attempt, please share the info mentioned above and any other problem you encounter.
In order to integrate Fortinet's Firewall (FortiGate) to Wazuh you need to cover two aspects of the requirement.
Connection : Make FortiGate to forward logs to Wazuh.
Analysis.
Aspect I : Connection
Wazuh can receive logs from external tools through syslog.
The general idea is described here in the Wazuh documentation : remote-syslog
You can receive syslog events in two ways:
directly as syslog events forwarded by the source to a ip and port. (preferred and simplest way)
storing the logs in a plain file and monitoring that file. (maybe through a custom syslog server that writes plaintext files, would require more extra work)
If you want to receive syslog events directly you need to configure Wazuh to receive syslog logs in a given port from an allowed-ip (ip here is where Fortigate is sending logs from).
Syslog Events Example: (ossec.conf)
<ossec_config>On the other hand if you manage to get Fortigate to relay syslog events to a syslog server that writes events to a plaintext file accessible by the Wazuh host, you need to setup file monitor of that file. syslog-file
Syslog File Monitoring Example: (how to monitor a file containing syslog events)
<localfile>Configure FortiGate
On the Fortigate's end, you need to enable it to forward Syslog events in the Logs Settings. (There is an online resource [external to Wazuh or official] that describes this process for FortiGate 60E Version 7.0.2, please have in mind any difference against your environment, this is just a guide that might help you).
https://network-knowledge.work/fortigate-syslog/
There you can setup the IP Address of the Wazuh Host that will receive and analyze these logs. (Remember that these instructions might differ from your current environment).
Remember that here you can setup your own syslog server as a relay that can store the events into a plaintext file that is accessible by the Wazuh Manager.
Note: If you have FortiAnalyzer already Setup, you can configure it to forward syslog events. Instructions
Aspect II : Analysis of FortiGate Logs
Wazuh comes ready with decoders and rules for processing Fortigate logs, so that is all you should need to do to start processing your logs. (independently of where these logs come from).
In order to process the Fortinet event logs properly the Wazuh manager contains a Ruleset of decoders and rules and it includes Fortinet decoders and rules. Please check: https://github.com/wazuh/wazuh/blob/v4.4.5/ruleset/decoders/0100-fortigate_decoders.xml
https://github.com/wazuh/wazuh/blob/v4.4.5/ruleset/rules/0391-fortigate_rules.xml
If any log is not properly recognized or any alert is not triggered, you could also create custom rules and decoders : https://documentation.wazuh.com/current/user-manual/ruleset/custom.html
I hope this info successfully leads you to integrate FortiGate to Wazuh and get the big picture of a common remote syslog integration to Wazuh.
The goals of this integration are:
Setup FortiGate to forward syslog events to Wazuh.
Setup Wazuh to receive and monitor these remove events, through direct syslog events or a plaintext file accessible by the Manager.
Let's please keep in touch with any update on this or any other thing you might encounter during the process.
Kindest regards,
Jorge.