How to Export and Review Palo Alto and FortiGate Firewall Logs

· Original article ↗

Summary

A practical guide to forwarding Palo Alto and FortiGate logs to a Linux rsyslog collector or downloading existing logs, with configuration steps, review patterns, and troubleshooting advice.

Key points

  • Check logging policies first: PAN-OS default rules and FortiGate implicit-deny logging may not record denied traffic by default.
  • Forward logs to a Linux collector with rsyslog; configure PAN-OS log forwarding or FortiGate syslog settings and attach or commit the relevant profiles.
  • Restrict UDP 514 access to the firewall’s management or logging interface and the collector.
  • For historical logs, FortiGate supports raw-log downloads through its GUI; PAN-OS history is usually available through Panorama, Strata Logging Service, or a SIEM.
  • Review repeated outbound connections, unusually high outbound data, port scanning, threat-log hits, and unusual firewall admin logins or configuration changes.
  • Troubleshoot missing logs by checking policies, network access, syslog settings, and commits; consider TCP syslog if UDP message-size limits truncate long lines.

Article Details

Defense Focus
Collect and retain firewall traffic, threat, administrative, and configuration logs so they can be analyzed for suspicious activity.
Detection Methods
  • Look for repeated outbound sessions to the same rare external IP at regular intervals as possible command-and-control beaconing.
  • Compare outbound data volumes and flag an internal host sending substantially more bytes than usual.
  • Look for one source contacting many destination ports within a short period as possible scanning.
  • Review IPS, antivirus, spyware, and URL-filtering detections, including activity that followed the alert.
  • Review firewall admin logins from unusual IPs and configuration changes at unusual times.
Data Sources
  • PAN-OS Traffic, Threat, System, and Config logs
  • FortiGate Forward Traffic, Security Events, System Events, and event logs
  • Firewall syslog records collected in /var/log/firewall/fw.log
  • Historical logs held by Panorama, Strata Logging Service, FortiAnalyzer, or FortiCloud
Rule Types
  • Syslog forwarding and file-output configuration
  • Detection rules for command-and-control over common protocols, exfiltration over alternative channels, and network scanning
Platforms
  • PAN-OS
  • FortiGate
  • Panorama
  • Strata Logging Service
  • FortiAnalyzer
  • FortiCloud
  • FortiGate Cloud
  • Prime Core
  • LogTotal
  • rsyslog
Defensive Actions
  • Enable logging on PAN-OS default rules and the FortiGate implicit deny policy when denied traffic needs to be recorded.
  • Configure logging per FortiGate policy and attach a log-forwarding profile to PAN-OS security rules.
  • Forward Traffic and Threat logs, as well as System and Config logs, to a syslog collector.
  • Restrict access to UDP 514 on the collector to the firewall's management or logging interface.
  • Check each network and configuration hop if the collector receives no logs; use a packet capture to verify UDP 514 traffic.
  • Use TCP syslog if long log lines are truncated by UDP message-size limits.
  • Forward logs off diskless FortiGate models because memory-only logs are lost on reboot; use centralized history sources where available.
  • Correct firewall time settings and NTP synchronization when timestamps do not align with other sources.
  • Sanitize log files before uploading them for review.

MITRE ATT&CK

Vendors

Products

Tools

Related Articles