Stateful — tracks connections. Stateless — filters packets individually.
Stateful Firewall:
Stateful:
Connection: Client → Server (SYN)
Firewall: tracks this connection
Response: Server → Client (ACK)
Firewall: allows (part of tracked connection)
(Tracks state)
Stateless Firewall:
Stateless:
Packet 1: Allow (matches rule)
Packet 2: Allow (matches rule)
(Each packet independent)
Key differences: