Description | The article describes the case when Syslog Server is connected to FortiGate via IPSec VPN Tunnel and stops sending logs periodically. |
Scope | FortiGate and Syslog. |
Solution |
As a workaround, disabling and enabling the Syslog Server fixes the issue however, this is not the feasible method.
Check if the traffic to the Syslog Server IP is leaving via the WAN interface instead of the IPSec tunnel:
di sniffer packet any "host <Syslog Server IP>" 4 0 l
If yes, clear the existing session: di sys session filter list di sys session filter src <Fortigate_source_IP> di sys session filter dst <Syslog_Server_IP> di sys session filter list di sys session clear
Reason for this Issue: When a FortiGate has an active route for a private subnet (RFC 1918), the traffic will be forwarded via that interface. When that interface (IPSec/LAN) goes down, the route will be removed from the routing-table and the traffic will be sent out via the default route.
Example:
Syslog config:
config log syslogd setting
In this example, the traffic is leaving out via wan1 instead of VPN:
FGT# diagnose sniffer packet any 'host 10.190.5.1' 4 0 l
Clearing the existing session:
di sys session filter src 192.168.210.1 di sys session filter dst 10.190.5.1 di sys session clear
After clearing the session:
FGT# diagnose sniffer packet any 'host 10.190.5.1' 4 0 l 0.118188 VPN1 out 192.168.210.1.8778 -> 10.190.5.1.514: udp 934
To fix this effectively, do the following:
Note: The same behavior is observed even when multiple syslog servers are configured on the FortiGate if the route to all the syslog servers uses the same IPsec tunnel.
Related articles: Technical Tip: Prevent RFC 1918 (LAN subnets) network traffic from exiting the WAN interface Technical Tip: Syslog server over IPSEC VPN and sending VPN logs |