ACL-003CybersecurityBeginner 1:15

Who decides which internet traffic is allowed into your network?

How a Firewall Works: What It Actually Checks

The short answer

A firewall reads each packet's headers (source and destination IP, protocol, and port), checks its rules from top to bottom, and drops anything that matches no rule, and a stateful firewall also lets in replies to connections you opened.

Key points

  1. A firewall sits between networks or hosts and filters the traffic.
  2. For every packet it reads the headers: source and destination IP address, protocol, and port.
  3. Rules are checked top to bottom. No match means the packet is dropped: that is default deny.
  4. A stateful firewall records your connections, so replies get in and unsolicited packets are dropped.
  5. A firewall does not stop what it allows: a phishing link over permitted HTTPS passes straight through.
Go deeper

What is a firewall?

A firewall is a security system that sits between networks or devices and allows or blocks traffic by checking each packet against a list of rules.

Diagram, myths, real examples, and sources

Transcript

Tap a line to jump there