A firewall is a security device or software solution that checks traffic moving between networks or security zones. It uses predefined rules to allow or block that traffic. A router decides where a message should go; a firewall decides whether the message is authorized to pass. section 12.5.1 section 11.2
A request leaving the office
When a request leaves a company network, it passes through a firewall before reaching the internet router. Think of the firewall as airport security: it checks the request against rules and blocks traffic from unauthorized origins or headed to unauthorized destinations. section 11.2
Firewalls also work inside an organization. Rules can separate accounting systems from employee workstations, making it harder for an attacker who reaches one part of the network to move into sensitive financial systems. This is network segmentation: dividing a network into zones and controlling traffic between them. section 12.5.1
Firewalls differ in how much they inspect:
- Packet filters check individual packets against basic criteria such as IP addresses and ports; they do not track ongoing connections. section 12.5.1
- Stateful packet filters track active connections and consider the context of a session. section 12.5.1
- Traditional firewalls commonly filter at network and transport layers; more modern ones can also inspect content and applications at higher layers. section 12.5.1
A firewall is one layer of defense, not the whole defense. Perimeter filtering works alongside internal network protections and safeguards on individual computers and servers, so other controls remain if traffic gets through. section 3.3


