Skip to main content
ametkola
Staff
Staff
December 12, 2024

Technical Tip: Disable certain logs being forwarded to FortiAnalyzer

  • December 12, 2024
  • 0 replies
  • 1780 views
Description

 

How to disable logs being logged and forwarded to FortiAnalyzer.

 

Scope

 

FortiGate.

 

Solution

 

This article describes how the logs can be stopped logging in Memory/Disk and being forwarded to FortiAnalyzer from certain firewall policies. In the following example, FortiGate is connected to FortiAnalyzer to forward and save the logs. As per the requirements, certain firewall policies should not record the logs and forward them.
But the firewall still sends logs hitting this rule to the FortiAnalyzer even though the logtraffic is set to disable.

 

config firewall policy

    edit <id>

        set name "test"

        set srcintf "LAN"
        set dstintf "SDWAN"
        set action accept
        set srcaddr "all"
        set dstaddr "all"
        set schedule "always"
        set service "ALL_ICMP" "PING"
        set utm-status enable
        set ssl-ssh-profile "certificate-inspection"
        set logtraffic disable<-

    next
end

 

The logs shown are ICMP error logs, which are controlled by extended-log under 'config log setting'.

 

KB.png

 

Check the following information in the Command Line:

 

config log setting
    set resolve-ip disable
    set resolve-port enable
    set log-user-in-upper disable
    set fwpolicy-implicit-log enable
    set fwpolicy6-implicit-log disable
    set extended-log enable <- Disable extended traffic logging.
    set local-in-allow enable
    set local-in-deny-unicast enable
    set long-live-session-stat enable
end


Once this settings option is changed, the required policies will stop being logged.

 

Related document:

'config log setting' - FortiGate CLI reference

    Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
    Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!