Skip to main content
Esteemed Contributor III
Dec 28, 2021 5:46 PM UTC

Technical Tip: How the 'negate' command in debug flow works.

  • Apr 16, 2026 12:51 PM UTC
  • 0 replies
  • 2423 views
  • Translate All
Description This article describes how the 'negate' command in debug flow works.
Scope FortiGate.
Solution

The negate property can be used to exclude an IP address from debug logs. For example, to capture the debug for all sources except the IP 8.8.8.8, run the following configuration:


diagnose debug reset
diagnose debug disable
diagnose debug flow filter addr 8.8.8.8
diagnose debug flow filter proto 1
diagnose debug flow filter negate addr
diagnose debug flow trace start 999
diagnose debug flow show function-name enable
diagnose debug enable

 

To Stop the Debugs:

 

diagnose debug disable

diagnose debug reset

 

After running the commands, if any traffic flows through the FortiGate, it is possible to see the output but not for the address 8.8.8.8. In other words, 8.8.8.8 is excluded from the debug.

 

Related articles:

Debugging packet flow - FortiGate Cookbook.

Troubleshooting Tip: Enable Policy Trace in Debug Flow.

Troubleshooting Tip: First steps to troubleshoot connectivity.

Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024