Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

Stateful Inspection

Direct answer

A stateful firewall remembers each connection it has allowed. Only the first packet is checked against the rules; the rest of the connection, including the replies, passes because it matches the stored session.

When to use this

Use it when replies are dropped although the request is allowed, when connections die after a period of silence, or when traffic takes different paths out and back.

First 30 seconds

1. Stateful inspection tracks connections and allows return traffic automatically.

2. Blocks unsolicited inbound.

3. Session table size and timeouts matter.

4. Asymmetric routing breaks it.

5. Basis of modern firewalls.

Operational verification

first packet → policy → session created → return allowed

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common traps

A state entry shows the inspector accepted a flow tuple/state transition, but it does not show endpoint identity, content safety or downstream completion.

Suspicious evidence: asymmetric flow, stale session, state table exhaustion, helper overreach, unsynchronized failover, invalid packets allowed or timeout shorter than application behavior.

Platform / version applicability
Network security
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.

PlatformNetwork security
Scope / prerequisiteUse it when replies are dropped although the request is allowed, when connections die after a period of silence, or whe…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

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

1 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 Verification path Verify boundary

new packet → policy match → state creation → return association → timeout/teardown → application outcome

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points

Replies need no rule — they need a session. If the request and the reply pass through different firewalls (asymmetric routing), the second one has no session and drops the reply. Idle sessions time out; long-lived quiet connections need keepalives. TCP is tracked by its flags; UDP and ICMP by timers.

Key checks
  • conntrack -L | head — Linux connection table
  • show conn (ASA) / show session all (Palo Alto) — firewall sessions
  • Session timeouts — config
ReferenceImportant terms & boundaries2 sections · depth on demand

What this shows and what it does not

A state entry shows the inspector accepted a flow tuple/state transition, but it does not show endpoint identity, content safety or downstream completion.

In depth

Stateful inspection tracks the state of each connection — TCP handshake, sequence numbers, UDP flows — and allows return traffic automatically for connections initiated from the permitted side. Unsolicited inbound packets that do not belong to an existing connection are dropped.

BehaviourBenefit
One rule per direction initiatedSimpler rule sets
Return traffic matched to state tableNo broad "allow established" holes
TCP state validationDrops invalid flags and out-of-window packets
Protocol helpers (ALGs)Handle FTP, SIP dynamic ports

State tables have limits: SYN floods and connection-heavy attacks can exhaust them, so firewalls need connection limits and SYN protection. Asymmetric routing breaks stateful inspection because the firewall sees only one direction of a connection.

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 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 docNetwork security current

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

Basis: https://csrc.nist.gov/pubs/sp/800/41/r1/final · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
connection trackingstateful packet inspectionsession inspection
Embedded reference data

Quick lookup tables

Network Security → Stateful Inspection proof map

Fast scope, effective-policy, runtime-evidence and closure boundaries for Network Security → Stateful Inspection.

BoundaryEstablishDoes not establish
Scope and intentExact subjects, destinations, application, direction, trust zone and expected decisionDoes not prove effective path, identity, cryptography or enforcement
Effective control stateResolved rule/policy, session/SA, identity/posture, translation and selected pathObject/config presence does not prove a match or packet outcome
Runtime evidenceCorrelated client, authenticator/firewall/VPN, AAA and destination observations for one flow/timeA single log or success does not prove every packet, peer, path or failover state
ClosureOriginal allowed/denied operation behaves as intended and regression/failure tests passAdministrative commit or tunnel-up state alone is not closure
Confirmation

Confirm action

Continue?