> For the complete documentation index, see [llms.txt](https://docs.blusapphire.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blusapphire.io/log-forwarding/03_log-forwarding-guide/log-forward/fortinet/fortinet.md).

# Fortinet

Forward Fortinet firewall logs to the log collector using GUI&#x20;

Follow the steps below to configure the FortiGate firewall:&#x20;

1. Log in to the FortiGate web interface&#x20;
2. Select Log & Report > Log Setting or Log & Report > Log Config > Log Setting (depending on the version of FortiGate)&#x20;
3. To export logs in the syslog format (or export logs to a different configured port): &#x20;

* Select the Log to Remote Host option or Syslog checkbox (depending on the version of FortiGate) Syslog format is preferred over WELF, in order to support vdom in Fortigate firewalls.&#x20;
* Enter the IP address and port of the “Log Collector”&#x20;
* In the Port field, enter the port the server uses for syslog messages. Please check Appendix A for default port list.&#x20;
* Select the logging level as Information or select the Log All Events checkbox (depending on the version of FortiGate)&#x20;
* Select the facility as local7&#x20;

1. Click Apply&#x20;

CAUTION: Do not select CSV format for exporting the logs. &#x20;

### Configuring RuleSets for Logging Traffic&#x20;

Follow the steps below to configure rulesets for logging all traffic from or to the FortiGate firewall:&#x20;

1. Select Firewall > Policy&#x20;
2. Choose a rule for which you want to log traffic and click Edit. You can configure any traffic to be logged separately if it is acted upon by a specific rule.&#x20;
3. Select the Log Traffic checkbox&#x20;
4. Click OK and then click Apply&#x20;

Repeat the above steps for all rules for which you want to log traffic.&#x20;

If “Log Collector” is unable to receive the logs from the Fortigate after configuring from UI, please carryout the steps to configure it through command prompt.&#x20;

(For the models like Fortigate 60, Fortigate 200, etc.) \
Please follow the steps to enable the device to send the logs to “Log Collector”.&#x20;

* Start CLI on the Fortigate firewall.&#x20;
* Execute the following commands to enable Syslog:&#x20;

### Enable syslog: &#x20;

`config log syslogd2 setting` \
`set status enable` \
`set server <IP>` \
`set csv disable` \
`set facility local7` \
`set port 1514` \
`set reliable disable` \
`end <cr>`&#x20;

Execute the following commands to enable Traffic:&#x20;

### Enable traffic: &#x20;

`config log syslogd filter<cr>` \
`set severity information<cr>` \
`set traffic enable<cr>` \
`set web enable<cr>` \
`set email enable<cr>` \
`set attack enable<cr>` \
`set im enable<cr>` \
`set virus enable<cr>` \
`end <cr>` &#x20;

Note: Type "`show log syslogd filter`" to list all available traffic.&#x20;

Note: In Fortigate OS v5.0, there is an option to send syslog using TCP. &#x20;

Note: If BluSapphire “Log Collector“ is not getting logs from Fortigate, please check Fortigate OS version. If it is v5.0 or above, ensure option 'reliable' is disabled in syslog config. Then it will use UDP. \
&#x20;

Syslog setting can only be done through CLI mode. There is no option in UI.&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.blusapphire.io/log-forwarding/03_log-forwarding-guide/log-forward/fortinet/fortinet.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
