Courseiva
Firewall Policies and NATmediumMultiple SelectObjective-mapped

Commands to Check Which Firewall Policy Matches Traffic

A FortiGate administrator is troubleshooting why traffic from a specific internal host is not being allowed through a firewall policy. The policy appears correct and is enabled. Which TWO diagnostic commands could the administrator use to determine if the traffic is matching a different policy?

Quick Answer

The answer is the diagnose debug flow and diagnose firewall iprope list commands. These two diagnostic commands are correct because they allow a FortiGate administrator to directly observe how traffic is being processed by the firewall engine. The diagnose debug flow command traces a specific packet’s path through the firewall, showing exactly which policy it matches or if it is dropped, while diagnose firewall iprope list displays real-time policy hit counters, revealing whether traffic is hitting an unexpected rule. On the Fortinet NSE 4 Network Security Professional exam, this question tests your ability to troubleshoot policy misconfigurations beyond simply checking the policy table—a common trap is assuming that a policy that looks correct is actually being matched, when in fact a different policy with a higher priority or broader source range is intercepting the traffic. A useful memory tip is to think of “flow” for the packet’s journey and “list” for the hit counts—if the flow shows a different policy number than expected, the list will confirm its hit count rising.

⚠ Common exam trap

The trap here is that candidates often rely on 'get system performance status' or 'execute ping' to troubleshoot policy matching, but these commands do not reveal which policy ID the traffic is matching or the order of evaluation.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

diagnose firewall iprope list

The 'diagnose firewall iprope list' command (D) displays the kernel's internal firewall rule list, allowing the administrator to verify the exact order and matching criteria of all policies. The 'diagnose debug flow' command (E) enables real-time packet flow tracing, showing which policy each packet matches and why it is accepted or denied. Together, these two commands directly reveal if traffic is matching a different policy than intended.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • get system performance status

    Why it's wrong here

    This shows system performance, not policy matching.

  • config system ha

    Why it's wrong here

    This is for HA configuration, not troubleshooting.

  • execute ping options

    Why it's wrong here

    Ping tests connectivity, not policy matching.

  • diagnose firewall iprope list

    Why this is correct

    This shows hit counts for each policy, indicating which policies are being matched.

  • diagnose debug flow

    Why this is correct

    This command traces the packet flow through the firewall, showing which policy matches.

About these practice questions

Courseiva writes every NSE4 question from scratch — 282 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on NSE4

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A FortiGate administrator is troubleshooting why traffic from a specific host (10.0.1.100) to a web server (203.0.113.50) is being denied. The administrator has confirmed that a firewall policy exists that should allow the traffic. Which TWO diagnostic commands would help identify the issue?

medium
  • A.get system performance status
  • B.diagnose firewall policy list
  • C.diagnose debug flow
  • D.execute ping-options source 10.0.1.100
  • E.diagnose sniffer packet any 'host 203.0.113.50' 4

Why B: 'diagnose firewall policy list' displays the effective policy table, including policy IDs, match criteria, and action (accept/deny). This helps verify whether the policy intended for the traffic is actually present and in the correct order. Option C is correct because 'diagnose debug flow' enables real-time packet flow tracing, showing exactly which policy is matched (or not) and why the traffic is denied, such as a policy hit with action 'deny' or a session table lookup failure.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This NSE4 practice question is part of Courseiva's free Fortinet certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the NSE4 exam.