Encryption protects traffic as it crosses a network, but it does not decide which traffic may enter or leave. Firewalls enforce that decision at network boundaries. Their designs have grown from stateless packet filters to systems that identify applications inside encrypted traffic, and zero trust extends the same controls to a world without a defensible perimeter.
Network Address Translation
NAT lets devices in an organization use private IP addresses, reserved ranges that are never routed on the public Internet. A NAT router rewrites addresses and ports as packets pass, using a translation table that maps internal address and port pairs to external ones. An outside host cannot address an internal device directly. Inbound traffic reaches a device only through a translation entry: one created by the device’s own outbound connection, or a fixed port forwarding entry configured to expose a service.
Translation and filtering are separate functions. NAT translates addresses, while firewall rules decide which traffic is allowed. Blocking unsolicited inbound traffic is a side effect of translation, not a security design, since NAT does not inspect traffic and does not restrict outbound connections.
Packet Filters
A packet filter examines each packet by itself and accepts or drops it based on header values: addresses, ports, protocol, and network interface. Rules form an ordered chain, and the first matching rule decides, so rule order determines the policy.
The basic principle of firewalling is that all traffic crossing a security boundary passes through the firewall that enforces the boundary’s policy. Ingress filtering controls inbound traffic and follows default deny: everything is blocked except the specific services the organization intends to expose. Filters also drop packets whose source addresses could only be forged, such as external packets claiming an internal source. Egress filtering controls outbound traffic and can keep a compromised host from downloading malware or exfiltrating data.
A stateless filter admits return traffic by accepting TCP packets with the ACK flag set. The approximation fails because an attacker can set the ACK flag on any packet.
Stateful Packet Inspection
A stateful firewall checks new connection attempts against its rules and records permitted connections in a state table. It uses that table, rather than a header flag, to admit return traffic and to reject packets inconsistent with the connection’s state. This supports the common policy that internal hosts may initiate outbound connections while outside hosts cannot initiate anything.
Protocols such as SIP negotiate their data ports inside their messages. Handling them requires an application-aware firewall that parses the payload and temporarily opens the negotiated ports.
Security Zones, the DMZ, and Segmentation
Organizations define security zones with different trust levels and enforce policy on traffic between each pair of zones. A DMZ holds the servers that must be reachable from the Internet, separated from both the Internet and the internal network. The policy differs by direction: the Internet reaches only specific services in the DMZ, outside traffic never reaches the internal network directly, and DMZ servers reach only what their jobs require. A server in the DMZ is hardened as a bastion host, with minimal software, essential accounts, and close monitoring.
Network segmentation generalizes the DMZ. The infrastructure is divided into separate networks, such as a web tier, a database tier, a development network, and guest WiFi, with firewalls enforcing policy between them. Segmentation applies the Principle of Least Privilege to networks: each segment can reach only the systems and services its work requires, restricting an attacker’s movement between segments.
Deep Packet Inspection
Deep packet inspection reads the application data inside packets. It supports hostname filtering through the server name exposed in a TLS handshake, validation that traffic follows its protocol, and matching content against malware signatures. Inspection systems reassemble traffic streams, so a signature split across packets is still detected.
Inspection faces two constraints: it must keep up with network speed, and it cannot read encrypted traffic without the plaintext. TLS interception obtains the plaintext by decrypting and re-encrypting traffic at the firewall. Clients then receive the firewall’s certificate instead of the real server’s, and end-to-end protection stops at the firewall. Encrypted Client Hello hides the server name in the handshake, which takes away the signal hostname filtering depends on.
Intrusion Detection and Prevention
An IDS monitors traffic and reports suspicious activity. An IPS sits inline in the traffic path and drops malicious packets before delivery. Detection takes three forms, used separately or together:
-
Protocol-based detection checks messages for violations of protocol rules. It detects malformed messages but misses attacks carried in valid messages.
-
Signature-based detection matches traffic against known attack signatures and misses attacks whose traffic matches none of its rules.
-
Anomaly-based detection flags deviations from a baseline of normal behavior and produces false positives when legitimate behavior changes.
In deployment, false positives produce more alerts than analysts can review, content inspection requires access to decrypted traffic, and attackers evade matching by splitting, encoding, and re-timing their traffic.
Next-Generation Firewalls
An NGFW combines stateful inspection, deep packet inspection, and intrusion prevention in one platform, and adds awareness of applications and user identities. Port numbers no longer identify applications, since nearly everything uses HTTPS on port 443, so an NGFW classifies applications from network-visible clues: handshake structure, TLS metadata, traffic timing and sizes, and known server addresses. It cannot see which program on a host generated the traffic.
Application Proxies
An application proxy is a service’s external interface. It terminates the client’s connection and opens its own connection to the real server, which gives it control of both sides. It validates the protocol, filters content, hides internal structure, and logs every request. Each protocol needs its own proxy, and the proxy can become a bottleneck. An API gateway applies the same design to web APIs, authenticating and authorizing every request before forwarding it to an internal service.
Host-Based Firewalls
A host-based firewall runs on the endpoint and filters that system’s own traffic, including traffic from machines on the same internal network that never crosses the perimeter. Filtering at the endpoint restricts lateral movement, an attacker spreading from one compromised machine to its neighbors. Host firewalls integrated with the operating system can allow or block network access per application. Network and host-based firewalls complement each other, and the network firewall still stands when malware with administrator privileges disables the host’s own firewall.
Zero Trust
The perimeter model trusts a location: inside the perimeter means safe. Mobile devices, cloud computing, insider threats, and compromised internal systems have erased the defensible boundary, a change called deperimeterization.
Zero trust replaces trusted locations with verified identity: never trust, always verify. Access is granted per session, to one resource at a time, by dynamic policy that weighs the user’s identity, the device’s state, location, and threat level. Authentication establishes identity, while policy decides access to each resource, so being inside the network does not authorize anything.
Microsegmentation applies segmentation to individual applications and workloads, giving each a policy that permits only its required communication. Zero Trust Network Access replaces broad VPN access. An intermediary authenticates the user, checks the device’s posture, and connects the user to the one application requested, without general network connectivity.
Zero trust is an architecture rather than a product. Legacy applications assume the network protects them, coordinating identity, devices, and policy across every resource is complex, and an attacker holding valid credentials and a compliant device still passes the checks.
What You Don’t Need to Study
The following are not required for the exam:
-
The history: who coined zero trust, when products appeared, and the names of early intrusion detection systems. Know the progression from stateless filtering to stateful inspection to content inspection.
-
How services authenticate each other inside a data center, including service meshes. Know that zero trust applies to connections between services, not only to users.
-
The term NAPT and the private address ranges by number. Know that private addresses are not routable and that NAT rewrites ports as well as addresses.
-
The deep content inspection (DCI) label. Know that content inspection reassembles streams and decodes content before matching.
-
Which operating systems enable their firewalls by default, the names of specific products, and which regulations call for segmentation.
-
Port numbers beyond the well-known web and mail ports you have already seen.