Skip to main content
This page explains how to forward FortiGate traffic logs (WAN to LAN and LAN to WAN) to a syslog server IP and UDP port, using the GUI or the CLI.

Step 1: Configure Syslog Destination

Use the Web GUI or the CLI. Use the CLI for a custom UDP port.
  1. Go to Log & Report > Log Settings.
  2. Toggle on Send Logs to Syslog.
  3. Enter the IP Address/Name of your Syslog server.
  4. Set Mode to UDP (or leave default if standard port 514 is used).
  5. Click Apply at the bottom of the page.
The GUI always uses the default port (UDP 514). For a custom port, use the CLI.

Step 2: Enable Logging on Firewall Policies

Traffic logs are sent only for firewall policies that have logging enabled.
1

Open Firewall Policies

Navigate to Policy & Objects > Firewall Policy.
2

Configure LAN -> WAN Policy

  1. Select the outbound rule (LAN to WAN) and click Edit.
  2. Scroll down to the Logging Options section.
  3. Enable Log Allowed Traffic.
  4. Select All Sessions to capture all connections.
  5. Click OK.
3

Configure WAN -> LAN Policy

  1. Select the inbound rule (WAN to LAN, e.g., VIPs / Port Forwarding) and click Edit.
  2. Enable Log Allowed Traffic > All Sessions.
  3. Click OK.

Step 3: Verify Traffic Output

To check that the FortiGate is sending syslog packets, run a packet trace in the CLI: