Firewall Technologies
Compare packet-filtering, stateful, proxy, NGFW, WAF, host-based, and cloud-native controls.
Understand classic and next-generation firewall types, deployment models, and selection criteria for layered defence.
Core Firewall Types
Firewall Type | OSI Layer | Key Characteristics | Use Cases & Considerations |
---|---|---|---|
Packet-Filtering Firewall | Network Layer (Layer 3) |
| Strengths: Low latency, easy to deploy on routers and simple appliances. Limitations: Limited visibility into payload; susceptible to spoofing and application-layer attacks. Use Cases: Perimeter filtering, Embedded router ACLs, IoT network segmentation |
Stateful Inspection Firewall | Network/Transport Layers (Layers 3-4) |
| Strengths: Better protection against spoofed packets and unauthorized session attempts. Limitations: Still limited visibility into application payload; can be resource intensive on large-scale networks. Use Cases: Enterprise edge firewalls, VPN gateways, Data center north-south traffic |
Application / Layer-7 Firewall (Proxy) | Application Layer (Layer 7) |
| Strengths: Deep inspection, protocol validation, content filtering. Limitations: Higher latency, requires protocol-specific configuration, may break encrypted sessions without TLS inspection. Use Cases: Web application proxies, Email security gateways, Outbound content filtering |
Next-Generation Firewall (NGFW) | Multi-layer (3-7) |
| Strengths: Comprehensive control, unified policy management, granular app/user rules. Limitations: Complex to deploy/tune, higher cost, requires regular updates for signatures and apps. Use Cases: Enterprise edge, Segmentation between trust zones, Cloud virtual firewalls |
Web Application Firewall (WAF) | Application Layer (HTTP/HTTPS) |
| Strengths: Focused protection for web apps, integrates with DevSecOps for rapid mitigation. Limitations: Requires tuning to avoid false positives, limited visibility beyond HTTP/S. Use Cases: Protecting internet-facing web services, API gateways, CDN edge security |
Cloud-Native Firewall / Security Groups | Virtualized network layer per cloud provider |
| Strengths: Scales with cloud deployments, integrates with automation and IaC workflows. Limitations: Limited L7 features in basic offerings, provider-specific syntax. Use Cases: Microsegmentation in cloud, Hybrid workloads, Serverless protections |
Host-Based Firewall / Endpoint Firewall | Host network stack (Layers 3-4) |
| Strengths: Granular per-host control, protects against lateral movement. Limitations: Requires configuration management, risk of inconsistent policy if unmanaged. Use Cases: Server hardening, Workstation protection, Containerized workloads |
Layered Architecture Diagram
Layer 1
Perimeter Firewall
Edge NGFW providing north-south inspection, VPN termination, and threat intel blocking.
Layer 2
Internal Segmentation Firewall
Rules between user VLANs and critical workloads implementing zero trust.
Layer 3
Host-Based Firewall
Workload-local policies (iptables, Windows Defender Firewall) enforcing least privilege.
Layer 4
Cloud Security Group
Provider-native rules attached to instances/subnets for east-west control.
Layer 5
Application Firewall / WAF
Layer-7 inspection protecting web apps and APIs against OWASP risks.
Deployment Models
Perimeter Firewall
Classic edge firewall between trusted internal network and untrusted external network.
Focus: North-south traffic inspection, VPN termination, DDoS mitigation.
Internal Segmentation Firewall (ISFW)
Enforces policy between internal zones (e.g., user VLANs, data center tiers).
Focus: Zero trust, lateral movement prevention, compliance mandates.
Virtual / Cloud Firewall
Software-based firewalls deployed within cloud or virtualized environments.
Focus: Microsegmentation, workload isolation, policy-as-code integration.
Distributed Firewall / SDN-Based
Policy enforced at the hypervisor or virtual switch level (e.g., VMware NSX, Cisco ACI).
Focus: Scalable east-west control, dynamic policy tied to workloads/tags.
Hybrid Firewall Architecture
Combination of physical, virtual, and cloud-native controls managed centrally.
Focus: Unified visibility across on-prem and cloud, consistent policy enforcement.
Advanced Inspection Features
- Deep Packet Inspection (DPI) for application signatures and protocol anomalies.
- Intrusion Prevention (IPS) with signature and behaviour-based detection.
- SSL/TLS inspection for encrypted traffic visibility (requires certificate management).
- User and Identity awareness via directory integration (AD/LDAP).
- Sandboxing and malware analysis for suspicious files.
Selection Checklist
- Define in-scope traffic flows (north-south, east-west, cloud, remote access).
- Assess performance needs (throughput, concurrent sessions, SSL inspection impact).
- Determine compliance requirements (PCI DSS segmentation, HIPAA safeguards, CJIS).
- Plan for automation and integration (REST APIs, SIEM logging, SOAR workflows).
- Establish maintenance processes (signature updates, rule review, change control).
Zero Trust Considerations
- Adopt least privilege policies: default deny, allow only known applications/ports.
- Leverage dynamic groups/tags to simplify policy in dynamic environments.
- Continuously monitor policy hits and adjust based on actual application dependency maps.
- Use layered firewalls (perimeter + host-based) to protect against control plane bypass.
- Regularly test policies with red/purple team exercises to validate segmentation.
Example Rule Sets
Perimeter Allow Rules
- Allow: Corporate HQ IP range -> VPN Gateway (UDP 500, UDP 4500, ESP).
- Allow: Internet -> Web VIP (TCP 443) with WAF inspection.
- Allow: SOC management network -> Firewall management interface (HTTPS, SSH).
Precede with default deny; enable logging for allowed and denied traffic for auditing.
Internal Segmentation
- Allow: App Servers -> Database Servers (TCP 1433) with IPS, TLS inspection.
- Allow: Jump Host -> Admin Subnet (RDP/SSH) with MFA and session recording.
- Deny: User VLANs -> Database Servers (any) except approved service accounts.
Leverage tags/identity to avoid IP-centric policies in dynamic environments.
Host-Based Example (Linux iptables)
iptables -P INPUT DROP
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -s 10.10.10.0/24 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
Apply via configuration management; ensure logging for dropped packets (`-j LOG`).
AWS Security Group Snippet
{ "IpProtocol": "tcp", "FromPort": 443, "ToPort": 443, "CidrIp": "0.0.0.0/0" }
{ "IpProtocol": "tcp", "FromPort": 22, "ToPort": 22, "CidrIp": "203.0.113.10/32" }
Restrict administrative access to trusted IPs; use security group references for tier-to-tier traffic.
Azure NSG YAML (Bicep/Terraform-style)
priority: 100, direction: Inbound, access: Allow, protocol: Tcp, source: VirtualNetwork, destination: AppTier, port: 1433
priority: 200, direction: Inbound, access: Deny, protocol: *, source: *, destination: AppTier, port: *
Express rules as infrastructure-as-code to maintain version control and peer review.