Created on
10-24-2019
06:51 AM
Edited on
07-28-2025
10:27 PM
By
Anthony_E
Description
This article describes how to handle cases where syslog has been masking some specific types of logs forwarded from FortiGate.
Diagnosis to verify whether the problem is not related to FortiGate configuration is recommended.
Scope
FortiGate.
Solution
Perform packet capture of various generated logs.
Start a sniffer on port 514 and generate various logs:
Note:
Logs are sent to Syslog servers via UDP port 514. Run the following sniffer command on FortiGate CLI to capture the traffic: If the syslog server is configured on the remote side and the traffic is passing over the tunnel.
diagnose sniffer packet any 'udp port 514' 4 0 l
diagnose sniffer packet any 'udp port 514' 6 0 a
diagnose sniffer packet any 'host x.x.x.x and port 514' 4 0 l <- Where x.x.x.x is Syslog Server IP.
diagnose sniffer packet any 'host x.x.x.x and port 514' 6 0 a <- Where x.x.x.x is Syslog Server IP.
It is important to note that logs are sent over UDP, not TCP. Sometimes on the FortiGate, the syslog settings are configured to send the traffic over TCP. Make sure the configuration on the FortiGate is correct and make the appropriate changes as suggested below.
config log syslogd setting
set status enable
set mode udp
end
Run all these commands in a separate CLI console.
If the syslog server is configured on the remote side and the traffic is passing over any IPSEC tunnel, than the route should be configured correctly and the syslog traffic should be routed through the tunnel interface.
To confirm the route on the routing table and to troubleshoot the traffic, the following commands can be useful:
get router info routing-table details x.x.x.x <- Where x.x.x.x is syslog IP address.
diagnose debug reset
diagnose debug enable
diagnose debug console timestamp enable
diagnose debug flow filter addr x.x.x.x <----- Where x.x.x.x is the syslog server IP address.
diagnose debug flow filter port 514
diagnose debug flow show function-name enable
diagnose debug flow trace start 1000
To stop the debug:
diagnose debug disable
diagnose debug reset
Related article:
Technical Tip: Logs generated while using the 'diagnose log test' command
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.