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.
Stateful Inspection
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.
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.
first packet → policy → session created → return allowed
Context & applicabilityCommon mistakes · platform/version boundaries
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.
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
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 · 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.
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.
conntrack -L | head— Linux connection tableshow 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.
| Behaviour | Benefit |
|---|---|
| One rule per direction initiated | Simpler rule sets |
| Return traffic matched to state table | No broad "allow established" holes |
| TCP state validation | Drops 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.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
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%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.
Quick lookup tables
Network Security → Stateful Inspection proof map
Fast scope, effective-policy, runtime-evidence and closure boundaries for Network Security → Stateful Inspection.
| Boundary | Establish | Does not establish |
|---|---|---|
| Scope and intent | Exact subjects, destinations, application, direction, trust zone and expected decision | Does not prove effective path, identity, cryptography or enforcement |
| Effective control state | Resolved rule/policy, session/SA, identity/posture, translation and selected path | Object/config presence does not prove a match or packet outcome |
| Runtime evidence | Correlated client, authenticator/firewall/VPN, AAA and destination observations for one flow/time | A single log or success does not prove every packet, peer, path or failover state |
| Closure | Original allowed/denied operation behaves as intended and regression/failure tests pass | Administrative commit or tunnel-up state alone is not closure |