Learn a practical, read-only workflow for filtering FortiGate sessions and comparing policy IDs, NAT details, and traffic in both directions.
Exact client, server, protocol, port
Filtered session and policy
Counters, capture, application test
Start with one reproducible flow
A session table is useful when the firewall has already seen a connection but the application still fails. Start with a specific client and server pair instead of dumping every session. Record the VDOM, timestamp, protocol, destination port, and application action. A single browser page may open many connections, so choose one reproducible request.
This guide uses an illustrative TCP connection from 10.20.30.40 to 198.51.100.20 on port 443. Replace those values. The destination is a documentation address, not a service to test. Commands and output fields depend on FortiOS version and hardware.
Filter before listing sessions
Clear old display filters, set the tuple, and list matching entries. The word clear in the first command removes the filter. It does not flush live connections. Session deletion is a separate operation and is deliberately excluded from this read-only procedure.
A missing entry is a finding to investigate. Check the correct VDOM, the address actually seen by the firewall, whether the connection expired, and whether the client sent a fresh request. Keep the original tuple distinct from any translated addresses. Use command help on your release if a filter option differs.
diagnose sys session filter clear
diagnose sys session filter src 10.20.30.40
diagnose sys session filter dst 198.51.100.20
diagnose sys session filter proto 6
diagnose sys session filter dport 443
diagnose sys session list
Read the entry as evidence
Find the policy_id and correlate it with the intended policy. Review original and reply traffic counters together. Inspect NAT-related tuples and hooks to understand whether address or port translation occurred. Do not treat every printed address as the original client address.
Avoid memorizing a single numeric protocol-state value as a universal explanation. State meanings depend on the protocol. Also distinguish an existing session from a successful application transaction. A session with packets in both directions can still carry a TLS alert, authentication failure, HTTP error, or an application reset.
Build a small investigation table
For your incident notes, create five columns: expected flow, observed policy, observed translation, original counters, and reply counters. Capture two observations around the same test. Counters that grow only in the original direction suggest a different next check from counters growing in both directions.
For example, if the expected server is 198.51.100.20 but the translated destination points elsewhere, verify the relevant VIP or NAT configuration. If the translation is correct and replies are absent, capture on the egress path and check the server gateway. These are investigation branches, not proof that a particular component is faulty.
Correlate with a capture and close the test
Use a short packet capture for the same test tuple and compare timestamps with the session and traffic log. Hardware offload can affect what a CPU-side capture or debug shows, so absence from one diagnostic view alone is not sufficient proof of packet loss. Consult release-specific guidance before changing acceleration settings.
Do not clear all sessions as a routine troubleshooting step. If a later maintenance procedure requires removing a connection, review the exact filter and impact first. At the end of this read-only investigation, remove your display filters and record the successful application result, expected policy, translation, and bidirectional evidence.
diagnose sys session filter clear
References and further reading
Fortinet session table information