A firewall permits or denies network traffic using a set of rules called an access control list (ACL). Stateless firewalls filter based on packet header information only: IP address, port, and protocol. Stateful firewalls also track the state of active connections, allowing more precise control. Next-generation firewalls (NGFWs) add deep packet inspection, intrusion prevention, and application-layer filtering. ACL rules are checked in order and the first matching rule is applied, so rule order matters. Each network segment and each ingress or egress point between the internal network and the internet should have a firewall. A typical ACL rule specifies direction (inbound or outbound), filter criteria (IP, port, protocol, or application), and action (permit or deny). For example: Allow inbound TCP port 22 from ALL permits SSH traffic; Deny inbound TCP port 80 from 192.168.1.0/24 blocks HTTP from that subnet.
- Stateless firewall: Filters traffic using packet header fields only: source and destination IP, port, and protocol.
- Stateful firewall: Tracks connection state in addition to header filtering, enabling connection-aware rules.
- Next-generation firewall (NGFW): Combines stateless and stateful filtering with deep packet inspection, intrusion prevention, and application-layer awareness.
- Access control list (ACL): An ordered list of rules a firewall uses to permit or deny traffic; the first matching rule is executed.
- Rule order: ACL rules are evaluated top to bottom; changing the order changes which traffic is allowed or denied, so precedence must be planned carefully.
Given a set of ACL rules, can you trace a specific packet through the list and determine whether it is permitted or denied, and explain why rule order matters?
| Firewall Type | Filtering Basis | Additional Capabilities |
|---|
| Stateless | Packet headers (IP, port, protocol) | None beyond header fields |
| Stateful | Headers plus connection state | Connection-aware rules |
| NGFW | Headers, state, and payload | Deep packet inspection, intrusion prevention, app filtering |