Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

NGFW Stateful Inspection

Direct answer

Stateful inspection tracks each connection's state (for example TCP handshake and sequence), so return traffic is allowed automatically and packets that do not belong to a known session are dropped. General firewall principles are in Firewall.

When to use this

Use it when a connection starts but replies are dropped, when long idle sessions die, or when traffic works in one direction only through a firewall.

First 30 seconds

1. show conn (ASA) or the session table — is there a connection entry for the flow?

2. Return traffic is allowed only for existing state.

3. Asymmetric routing breaks state — check both directions use the same firewall.

Operational verification

first packet (TCP SYN) permitted by a rule → connection entry created → replies matched to the entry, no rule needed → entry removed on close or idle timeout → a packet without an entry is dropped (asymmetric path, timeout)

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE
Key commandshow zone-pair security
Scope / prerequisiteUse it when a connection starts but replies are dropped, when long idle sessions die, or when traffic works in one dire…
Show · 1
What next?3 suggested next steps
Catalog command links1
Evidence0
On this pageJump to a specific section
Verification

Show Commands

Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Known-good, broken state and proof boundary Verify boundary

Known-good for Stateful Inspection means the intended object exists in the correct scope, the relevant show zone-pair security fields agree with desired state, dependencies needed by the flow are reachable/usable, and the original operation succeeds again on the same target. Evidence boundary: show zone-pair security shows only the fields it exposes at that time; it does not by itself show root cause, hidden provider state or end-to-end success.

Step 2 Observation-driven branch tree Narrow the fault

Troubleshooting branch for Stateful Inspection: if show zone-pair security cannot resolve the intended object, verify target identity/context first; if the object resolves but state differs from intended, isolate configuration, precedence and dependency ownership; if local state matches intent but the original operation still fails, move outward to the first adjacent dependency or consumer; if a minimal change alters the symptom without restoring the same failing operation, treat that as a changed failure point rather than closure.

Step 3 Common mistakes Narrow the fault
  • Asymmetric routing through two firewalls, breaking state.
  • Connection timeouts too short for long-lived sessions (databases, SSH).
Command lookup Jump straight to Cisco syntax
Key points

A connection-table entry proves local tracking, not successful application delivery or comprehensive threat inspection.

Key checks

show conn on ASA/FTD (or the session table on another platform) → an entry for the flow and its flags. show asp drop → packets dropped for having no connection. Compare forward and return path: both must cross the same firewall.

ReferenceWhat it is2 sections · depth on demand
ReferenceHow it works2 sections · depth on demand

Technical Mechanics

Correlate the same device, protocol and flow tuple with connection state, applied policy and the return path. Stateful handling does not automatically classify the application or inspect file contents.

How it works

The primary observation show zone-pair security is a bounded read surface: correlate its fields with the configured intent, dependency state and the consumer that actually experiences the symptom.

ReferenceImportant terms & boundaries4 sections · depth on demand

Proof Boundaries

A connection-table entry proves local tracking, not successful application delivery or comprehensive threat inspection.

In depth

Stateful inspection

Stateful inspection is the foundation of modern firewalls. NIST SP 800-41 Rev. 1 describes it as tracking each connection in a state table and blocking packets that deviate from the expected state. The table holds source and destination addresses and ports and a connection state: a TCP connection goes from initiated to established after the three-way handshake, while UDP entries, with no formal setup or teardown, are removed after a timeout.

State table entry

FieldExample
ProtocolTCP
Inside address and port10.110.0.64:51522
Outside address and port142.250.74.46:443
StateEstablished
Idle timerReset by traffic

What stateful inspection gives

BenefitExplanation
Return traffic allowed automaticallyReplies match an existing entry; no inbound rule needed
Spoofed packets droppedA TCP packet without matching state is rejected
Simpler rulesRules describe who may start connections
Protocol awarenessHelpers for protocols that open secondary connections (FTP, SIP)
fw# show conn address 10.110.0.64 detail
TCP outside: 142.250.74.46/443 inside: 10.110.0.64/51522,
    flags UIO, idle 2s, uptime 4m12s, timeout 1h0m, bytes 1832200
UDP outside: 10.20.0.53/53 inside: 10.110.0.64/52011,
    flags -, idle 0s, uptime 0s, timeout 2m0s, bytes 94
R1(config)# ip inspect name FW-OUT tcp
R1# show policy-firewall sessions platform

flags UIO on the firewall means up, inbound and outbound data seen.

Limits

LimitImplication
Asymmetric routingReturn traffic through another firewall has no state and is dropped
State table sizeFloods of connections can exhaust it
Long-lived idle connectionsTimeouts can drop them; tune per application
No application insightPort 443 is allowed regardless of the application (NGFW adds that)

Design so both directions of a flow pass the same firewall or a clustered pair that shares state.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Quick reference

Stateful inspection tracks the state of every connection passing through the firewall. When the first packet of a session is permitted, the firewall creates a session entry, and return packets matching that entry are allowed automatically; packets that do not belong to a known session and are not permitted are dropped.

TrackedExample
TCP stateSYN, established, FIN/RST, sequence numbers
UDP pseudo-sessionsAddress/port pairs with idle timeout
ICMPEcho request/reply pairing
TranslationsNAT mapping per session

Asymmetric routing breaks stateful inspection: if return traffic passes a different firewall, it has no session and is dropped.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical examples

Configuration & expected output

Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.

Expected output

Cisco ASA / FTDshow conn address 10.1.1.20

Expected state: One entry for the flow with data in both directions.

TCP outside 203.0.113.10:443 inside 10.1.1.20:51844, idle 0:00:03, bytes 18432, flags UIO
! Illustrative output, not captured Evidence.
The firewall is tracking the session from inside host 10.1.1.20 to 203.0.113.10:443. Flags `U` = up, `I` = inbound data seen, `O` = outbound data seen. Only one of `I`/`O` suggests the replies take another path.
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

Authoritative/upstream documentation reviewed for bounded claims in Security → Next-Generation Firewall → Stateful Inspection. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%
Confirmation

Confirm action

Continue?