Send FortiGate logs to a syslog server
When to use this: You have a FortiGate firewall and want its logs delivered to your syslog server.
Before you start
Steps
-
Check the FortiGate can reach the server
terminalexecute ping-options source 192.168.1.1 execute ping 192.168.1.10Replace the first IP with the FortiGate interface address you want to send from and the second with the syslog server. If this fails, fix routing or firewalling first.
-
Configure the syslog destination (CLI)
terminalconfig log syslogd setting set status enable set server "192.168.1.10" set mode udp set port 514 endEnables remote syslog to
192.168.1.10.mode udpis the default. This is the minimal working configuration.GUI equivalent in FortiOS 7.4 and later: Log & Report, Log Settings, Global Settings, Syslog Logging. The menu path differs in older versions.
-
Optional: choose the source address
terminalconfig log syslogd setting set source-ip "192.168.1.1" endSyslog is treated as management traffic and leaves through the unit's routing, or its dedicated management interface if one is configured. Setting
source-ipmakes messages come from a known address so the server's allow-list matches. FortiOS 7.6 and later also offerset source-ip-interface <name>. -
Optional: reliable (TCP) delivery
terminalconfig log syslogd setting set mode reliable set port 514 endreliableuses RFC 6587 TCP syslog.legacy-reliableis the older RFC 3195 variant. The server must listen on TCP on the same port. FIPS-CC mode defaults to TCP 601. -
Optional: send through an IPsec tunnel
terminalconfig log syslogd setting set interface-select-method specify set interface "<IPsec tunnel interface>" endForces the syslog traffic out of a named interface, for example a VPN to a cloud server.
-
Make sure traffic is actually being logged
Syslog only forwards logs the FortiGate generates. Policies need logging enabled (see the logging scenario). Event logs (admin logins, config changes) are usually generated by default.
-
Verify on the FortiGate side
terminaldiagnose sniffer packet any 'host 192.168.1.10 and port 514' 4 0 lShows packets leaving towards the server. Press Ctrl+C to stop. If you see packets going out, the problem is on the server or the path; if you see none, the FortiGate is not generating or routing them.
-
Verify on the server
terminalsudo tcpdump -ni any host 192.168.1.1 and port 514 sudo tail -f /var/log/remote/192.168.1.1/$(date +%Y-%m-%d).logReplace
192.168.1.1with the FortiGate's source IP. Lines starting withdate=... time=... devname=...are typical FortiGate log fields.
Syntax confirmed against Fortinet Community technical tips (updated 2026) for the basic setup, source IP, tunnel, reliable mode and the 7.6 source-ip-interface option. Options such as format, facility and severity filters vary by FortiOS version, so list them with ? on your unit or check the FortiOS CLI reference.
How to verify it worked
- The server's sender folder for the FortiGate fills with new lines.
- A deliberate event (e.g. an admin login) shows up within seconds.
How to undo it
Disable remote syslog:
config log syslogd setting
set status disable
endCommon errors and fixes
tcpdump on the server and check ss -lunp. show log syslogd setting for status enable and the correct server, that policies log, and routing to the server (use the ping test with the same source). source-ip set. Set source-ip or allow the address you actually see. set format ? in config log syslogd setting for your FortiOS version and match your collector's parser (default, CSV, CEF, JSON and others may be offered). Q&A
What is the default FortiGate syslog port and protocol?
UDP 514. In FIPS-CC mode the default is TCP 601.
How do I send to more than one syslog server?
FortiGate provides syslogd, syslogd2, syslogd3 and syslogd4 settings, each with its own server.
What are the mode options?
udp, legacy-reliable (RFC 3195) and reliable (RFC 6587 TCP).
Which command proves the FortiGate is sending?
A packet capture: diagnose sniffer packet any 'host <server> and port 514' 4 0 l.