Description | This article describes how to disable logging on a particular firewall policy. |
Scope | FortiGate. |
Solution |
The option to disable the logging for a particular firewall policy is only found in the CLI.
Let's consider that the policy ID to edit is 11:
configure firewall policy edit 11 set logtraffic disable end
Follow the below link to open the CLI from the GUI: Technical Tip: How to open the CLI window in GUI
This option is also available in the GUI, by editing a policy and disabling the 'Log Allowed Traffic' option:
Note:
diagnose sys session filter src <source IP> diagnose sys session filter policy <policy ID> diagnose sys session filter dst <destination IP> diagnose sys session filter dport <port no> diagnose sys session list
If existing sessions are not expired, traffic will still be logged and FortiGate will keep the logs, see the below example:
session info: proto=6 proto_state=01 duration=13595279 expire=3530 timeout=3600 flags=00000000 socktype=0 sockport=0 av_idx=0 use=4 . . To clear this session:
diagnose sys session filter policy <Policy ID> diagnose sys session clear
After that verify using the below command to verify the duration of the session and the log should not be logged anymore:
diagnose sys session list |
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.