Differences

Compared

Stateful vs stateless firewall

A stateless filter judges every packet alone, by its addresses, protocol and ports. A stateful firewall remembers each connection, so it can let replies in while refusing new connections from outside.

Side by side

StatelessStateful
Judges Each packet aloneEach packet as part of a connection: new, established or related
Replies Need a rule of their ownAllowed, because the firewall saw the connection start
Remembers NothingA table of connections (conntrack on Linux)
Classic policy Permit and deny lines by address, protocol and port, with an implicit deny at the endAccept established and related, allow new from inside, drop new from outside
Examples A router's access control list; a cloud network ACLiptables with conntrack; a cloud security group

Each one explained

Stateful firewall
A firewall that remembers connections, so it can allow replies while refusing new connections in.
Access control list
An ordered list of permit and deny lines a router checks each packet against, applied to a card in or out.
Firewall
Rules deciding, packet by packet, what may reach or cross a device.
Security groups and network ACLs
The cloud's two firewalls: stateful allow rules on each instance, and stateless numbered rules on each subnet.

See the difference on real machines

Each lab is a small network of real Linux machines in your browser.

Open Stateful inspection: a firewall that remembers who started it

When it breaks

Sources

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab