An internal host's first packet toward an external HTTPS site (443) arrives on the firewall's LAN interface. That interface is mapped to a security zone — e.g. "LAN" — which is the very first classification the firewall makes, before it looks at a single header field beyond the physical port.
IngressBefore any policy is even consulted, the firewall runs basic sanity checks: malformed headers, checksum validity, and often a reverse-path check — is this source IP plausible arriving on this interface, given the routing table? A packet failing these is dropped immediately, with no policy lookup ever performed.
SanityThe firewall computes the packet's 5-tuple (source IP, destination IP, source port, destination port, protocol) and checks its live session table for a matching, already-established session.
Session LookupThis is the fork the entire mechanism hinges on. Match found (fast path): the packet reuses the forwarding, NAT, and security decisions already recorded for that session — no policy re-evaluation, no security-profile re-inspection, dramatically cheaper. No match (slow path — true for this first packet of a brand-new flow): the full pipeline below runs once, and the resulting decision is what gets cached as a session for every subsequent packet.
CheckpointFor this new session, the firewall consults its routing table to determine the likely egress interface/zone for the destination. On zone-based platforms this typically has to happen before policy evaluation, since policies are matched by source/destination zone, not just IP.
RouteRules are evaluated top-down, first-match: source zone/IP, destination zone/IP, service/port, and on NGFW platforms, application signature. The first rule that matches wins. A matching deny drops and logs the packet here. A matching allow continues — but note this isn't necessarily the final word (see step 8).
PolicyIf the matched policy specifies NAT — source NAT for this outbound flow, or a destination NAT/VIP for an inbound one — the translation is determined here, tied to the specific policy that matched.
NATFor this HTTPS flow, security profiles attached to the policy may run: SSL inspection (decrypt, inspect, re-encrypt, if configured), IPS signature matching, antivirus scanning, and web filtering category lookup. Critically, any one of these can still drop or reset the connection even though the base policy already said "allow" — a policy match is a permission to proceed to inspection, not a final verdict.
Security ProfilesA new session table entry is created, recording the matched policy ID, the NAT mapping, the security profile verdicts, and session timers. This is exactly the entry step 4's fast path will match against for every subsequent packet of this same flow — in both directions.
SessionThe packet is forwarded out the interface determined in step 5, with NAT applied per the decision in step 7, on its way toward the internet.
EgressA traffic log entry is generated (and updated as the session continues) recording the decision, the matched policy, and eventually bytes transferred and session duration — independent of whether a given packet was the very first (SYN) or somewhere in the middle of a long-lived flow.
LoggingThe server's reply arrives with the 5-tuple reversed, hits the session table from step 9 as an immediate match, and takes the fast path from step 4 — no policy re-evaluation, un-NAT applied, forwarded straight back to the internal host. This is the concrete mechanism behind "stateful firewalls don't need a separate inbound rule for return traffic."
Return| Term | Meaning |
|---|---|
| 5-Tuple | Source IP, destination IP, source port, destination port, protocol — the key used to identify a session |
| Session Table | The firewall's live record of established flows, enabling the fast path for subsequent packets |
| Fast Path / Slow Path | Cached-session forwarding vs. full policy + security-profile evaluation for a brand-new flow |
| Zone-Based Policy | Rules matched against logical security zones (interface groupings) rather than raw IPs alone |
| Anti-Spoofing / RPF | Reverse-path check verifying a source IP is plausible for the interface it arrived on |
| SSL Inspection | Decrypting, inspecting, and re-encrypting TLS traffic to apply deep inspection to encrypted flows |
| IPS | Intrusion Prevention System — signature/behavior-based detection and blocking of known exploit patterns |
| UTM | Unified Threat Management — bundled security profiles (AV, IPS, web filtering) on one platform |
| Implicit Deny | The default drop-all rule at the bottom of a policy base for traffic matching nothing explicit |
| VIP / DNAT | Destination NAT mapping a public-facing address/port to an internal server |