Home β€Ί D4: Network Security β€Ί Firewalls, IDS/IPS & Network Security Devices
Domain 4 Β· Lesson 2 of 6

Firewalls, IDS/IPS & Network Security Devices

Tường lα»­a, IDS/IPS & ThiαΊΏt bα»‹ BαΊ£o mαΊ­t MαΊ‘ng

Firewall Evolution β€” Packet Filter to WAF

Firewalls evolved from simple packet matching to deep application inspection. Each generation adds intelligence at a higher OSI layer. The exam tests knowing which firewall type is appropriate for which threat.

Type Intelligence Level Tracks State? Example / Use Case
Packet Filter (Stateless) IP address and port only β€” no context No β€” each packet evaluated in isolation iptables basic rules; ACLs on routers; GCP firewall rules (stateless mode)
Stateful Inspection IP/port + TCP connection state tracking Yes β€” tracks SYN, SYN-ACK, established Most enterprise firewalls (Cisco ASA, pfSense); GCP VPC firewall (stateful mode)
Application-Layer Proxy Full protocol understanding β€” reads application data Yes β€” acts as a full relay Squid proxy; SMTP gateway; breaks and re-establishes connections
NGFW (Next-Gen Firewall) App awareness + IPS + DPI + user identity Yes β€” plus application signatures Palo Alto Networks, Fortinet FortiGate, Check Point β€” used at network perimeter
WAF (Web Application Firewall) HTTP content inspection β€” OWASP rules Yes β€” session-aware HTTP inspection CloudFlare WAF, AWS WAF, ModSecurity β€” protects web apps from SQLi, XSS, CSRF

IDS vs IPS β€” Passive vs Active

The most common exam trap: IDS alerts but cannot block; IPS actively blocks but risks disrupting legitimate traffic. Deployment position determines capability.

Feature IDS (Intrusion Detection System) IPS (Intrusion Prevention System)
Network Position Out-of-band (passive tap β€” monitors a copy of traffic) Inline (sits directly in the traffic path)
Primary Action Alerts only β€” sends logs/alerts to SIEM Blocks traffic AND alerts β€” drops malicious packets
Risk of False Positives Low operational risk β€” cannot disrupt traffic High risk β€” false positives block legitimate users
Performance Impact Minimal β€” does not sit in traffic path Adds latency β€” every packet must be inspected inline
Best For Visibility, compliance logging, forensics β€” when false positive risk is high Active threat prevention β€” when accuracy is high and false positives are tuned

Detection Methods

Signature-Based Detection
  • β€’ Matches traffic against known attack patterns (signatures)
  • β€’ Low false positive rate β€” high accuracy for known threats
  • β€’ Cannot detect zero-day attacks (no signature exists yet)
  • β€’ Requires regular signature updates
Anomaly-Based Detection
  • β€’ Establishes a baseline of "normal" behavior
  • β€’ Alerts on deviations from the baseline
  • β€’ High false positive rate β€” tuning is critical
  • β€’ Can detect zero-day and unknown attacks (behavioral)

DMZ Architecture & Network Segmentation

A DMZ (Demilitarized Zone) is a semi-trusted network segment between the internet and the internal network. It hosts services that must be publicly accessible while protecting internal systems.

Internet β†’ [Outer Firewall] β†’ DMZ (Web servers, Email relay, DNS) β†’ [Inner Firewall] β†’ Internal Network
Internet β†’ DMZ
Allowed (controlled) β€” users can reach web servers, mail relay, public DNS in the DMZ.
DMZ β†’ Internal Network
BLOCKED by default β€” DMZ servers must NOT initiate connections to internal systems. This is the critical DMZ rule.
DMZ β†’ Internet
Restricted β€” only for specific outbound traffic (DNS lookups, NTP). Not unrestricted internet access.

Honeypots & Honeynets

Honeypot

A decoy system designed to attract attackers. Logs attacker behavior for intelligence gathering. No legitimate users should ever access it β€” any access is by definition suspicious.

Honeynet

A network of multiple honeypots. Simulates a full network environment to study attacker techniques, lateral movement, and tools.

Legal Consideration:

Entrapment concern applies if you actively lure attackers with deceptive promises of gain. Passive honeypots (deployed on your own network, visible to scanners) are generally legal. Consult legal counsel before deploying honeypots in regulated environments. Collect evidence properly for any prosecution.

NAC (Network Access Control) β€” 802.1X

802.1X is a port-based NAC standard that authenticates devices before granting network access. Prevents unauthorized devices from connecting to the network.

Supplicant (client device) β†’ Authenticator (switch/AP) β†’ Authentication Server (RADIUS)
  • Supplicant presents credentials (certificate, password) to the Authenticator
  • Authenticator forwards to RADIUS server β€” does not make auth decisions itself
  • RADIUS grants or denies access β€” can also assign VLAN based on identity
  • Used for both wired Ethernet ports and wireless access points
  • Can enforce endpoint health checks (patch level, AV status) before granting access

Key Terms

Stateless Firewall

Evaluates each packet independently using IP/port rules. No memory of previous packets or connection state.

Stateful Firewall

Tracks TCP connection state. Allows return traffic automatically for established connections. Operates at Layer 4.

NGFW

Next-Generation Firewall β€” adds application identification, user identity, IPS, and deep packet inspection to stateful inspection.

WAF

Web Application Firewall β€” inspects HTTP/HTTPS content at Layer 7. Blocks SQLi, XSS, CSRF based on OWASP ruleset.

IDS

Intrusion Detection System β€” passive, out-of-band. Monitors traffic and alerts. Cannot block traffic.

IPS

Intrusion Prevention System β€” active, inline. Detects and blocks malicious traffic in real time. Risk of false positives disrupting legitimate traffic.

Signature-Based Detection

Matches against known attack patterns. Low false positives but cannot detect zero-days or new attack variants.

Anomaly-Based Detection

Detects deviations from baseline behavior. High false positive rate but can catch unknown threats.

DMZ

Demilitarized Zone β€” semi-trusted network segment for public-facing servers. DMZ must NOT initiate connections to internal network.

NAC / 802.1X

Network Access Control β€” verifies device identity and health before granting network access. Requires RADIUS authentication server.

Honeypot

Decoy system to detect and study attackers. Any access to a honeypot is suspicious by definition.

RADIUS

Remote Authentication Dial-In User Service β€” centralized authentication server used by 802.1X, VPN, and wireless access points.

Exam Tips β€” Firewalls & IDS/IPS
  1. IDS = passive (alerts only); IPS = active (blocks). If a question asks what CAN disrupt legitimate traffic, the answer is IPS β€” not IDS. IDS cannot block anything.
  2. Anomaly-based = high false positive rate but catches unknown threats including zero-days. Signature-based = low FP rate but misses new attacks with no signature.
  3. DMZ critical rule: DMZ servers must NOT initiate connections to the internal network. Web servers in the DMZ should push data to internal systems via a pull mechanism (internal polls the DMZ), never direct DMZ β†’ internal connections.
  4. NGFW adds application awareness on top of stateful inspection β€” it can block "Facebook" or "BitTorrent" by application name, not just by port. Traditional stateful firewalls only know ports.
  5. Honeypot is passive deception β€” it detects attackers but cannot block them. IPS actively blocks. Both are valid controls but serve different purposes.
FinTech Company X / Platform C Application
  • Partner C (PH) β€” CloudFlare WAF: This is an Application-layer WAF + CDN at edge β€” equivalent to NGFW at Layer 7. Blocks OWASP Top 10 attacks before they reach GCP. Verify WAF rulesets are reviewed quarterly and custom rules exist for Partner C-specific endpoints (loan application, document upload).
  • Platform B Payment Cluster: Network-isolated in GCP β€” equivalent to a DMZ. Payment services cannot initiate connections to other Platform C namespaces (enforced by Kubernetes NetworkPolicies). This is the correct DMZ pattern.
  • Partner D B2B API: Fixed-IP allowlist at GCP firewall layer = stateless packet filter as first control. HMAC validation = application-layer control. Two-layer defense.
  • Recommendation: Add IDS capability using GCP Cloud IDS for anomaly detection across all Platform C namespaces. Currently there is no out-of-band traffic monitoring for lateral movement detection inside GKE. Cloud IDS provides Palo Alto Networks threat detection inline with GCP traffic mirroring β€” low operational risk, high visibility.

Practice Quiz β€” Firewalls & IDS/IPS

Q1. Which security device can potentially disrupt legitimate network traffic?

A. IDS β€” because it is inline
B. IPS β€” because false positives block legitimate traffic βœ“
C. IDS β€” because it uses anomaly detection
D. Honeypot β€” because it attracts attackers
IPS is deployed inline β€” traffic physically passes through it. When it generates a false positive (flagging legitimate traffic as malicious), it blocks that traffic. IDS is out-of-band and monitors a copy of traffic, so it cannot disrupt anything even with false positives.

Q2. Which traffic flow is NOT allowed in a correctly configured DMZ architecture?

A. Internet β†’ DMZ web servers
B. Internal users β†’ DMZ web servers
C. DMZ servers β†’ Internal network (initiating connections) βœ“
D. Internal servers β†’ DMZ (pulling data)
DMZ servers must never initiate connections to the internal network. If a DMZ server is compromised, this rule prevents attackers from using it as a pivot point into internal systems. Internal systems CAN poll/pull data from DMZ servers β€” the direction matters.

Q3. What is the key capability that distinguishes an NGFW from a traditional stateful firewall?

A. NGFW can track TCP connection state
B. NGFW adds application-layer awareness and user identity βœ“
C. NGFW operates at Layer 2
D. NGFW cannot generate alerts
Both NGFW and stateful firewalls track TCP state. The differentiator is that NGFW identifies applications regardless of port (e.g., "this is Skype traffic even on port 443"), enforces policy by user identity (via Active Directory integration), and includes built-in IPS β€” capabilities that stateful firewalls lack.

Q4. What is the main advantage of anomaly-based IDS over signature-based IDS?

A. Lower false positive rate
B. No baseline configuration needed
C. Can detect unknown/zero-day attacks βœ“
D. Requires no tuning after deployment
Anomaly-based IDS detects deviations from normal behavior β€” it does not need a signature for the attack. This means it can detect zero-day exploits and novel attack techniques that have no existing signature. The trade-off is a higher false positive rate that requires tuning.

Q5. 802.1X network access control requires which server component?

A. LDAP directory server only
B. Certificate Authority (CA) only
C. RADIUS authentication server βœ“
D. DHCP server with NAC plugin
802.1X requires a RADIUS server (Remote Authentication Dial-In User Service) as the Authentication Server. The network device (switch or AP) acting as Authenticator forwards credentials to RADIUS, which makes the access decision. RADIUS can consult LDAP/AD for user lookup, but RADIUS is the required component in the 802.1X architecture.