Network Security Research

Firewalls

A comprehensive technical overview of firewall technology — objectives, types, advantages, disadvantages, and protection mechanisms.

// Cybersecurity Fundamentals  ·  Network Defense  ·  2024
01 Objective & Purpose 🎯
A firewall is a network security device — hardware, software, or both — that monitors and controls incoming and outgoing network traffic based on a predefined set of security rules.

The primary objective of a firewall is to establish a barrier between a trusted internal network and untrusted external networks, such as the internet. It acts as the first line of defense in any network security architecture.

Firewalls are designed to:

→ Prevent unauthorized access — Block attackers, bots, and malicious actors from entering the internal network.
→ Control traffic flow — Enforce policies on which services, ports, and protocols are allowed or denied.
→ Audit and log activity — Record connection attempts for forensic analysis and compliance.
→ Segment networks — Separate internal zones (e.g., DMZ, LAN, VLAN) to contain breaches.
→ Enforce security policies — Translate organizational rules into machine-readable access controls.

02 Types of Firewalls 🧩
Generation 1

Packet Filtering Firewall

Operates at Layer 3/4. Inspects packet headers (IP, port, protocol) against static rules. Fast but stateless — no context awareness.

Generation 2

Stateful Inspection Firewall

Tracks the state of active connections. Understands TCP handshakes and allows only packets that belong to a valid, established session.

Application Layer

Application / Proxy Firewall

Operates at Layer 7. Acts as an intermediary (proxy) for specific applications like HTTP, FTP, DNS. Deep content inspection — hides internal topology.

Next-Gen

NGFW (Next-Generation)

Combines stateful inspection with DPI, IPS/IDS, SSL inspection, application awareness, user identity tracking, and threat intelligence feeds.

Cloud / Software

Cloud Firewall (FWaaS)

Delivered as a service from the cloud. Scales dynamically, protects distributed infrastructure and remote workers. Examples: Zscaler, Cloudflare Gateway.

Host-Based

Host-Based Firewall

Runs directly on an endpoint (OS-level). Controls per-application traffic on that machine. Examples: Windows Defender Firewall, iptables/nftables on Linux.

Web Security

WAF (Web App Firewall)

Specifically protects web applications. Filters HTTP/HTTPS traffic, blocks SQLi, XSS, CSRF, and other OWASP Top 10 attacks. Examples: ModSecurity, AWS WAF.

Circuit Level

Circuit-Level Gateway

Monitors TCP handshakes at the session layer (Layer 5). Validates sessions without inspecting packet content — lightweight but limited visibility.

03 Advantages & Disadvantages ⚖️
Advantages
  • Blocks unauthorized access and reduces the attack surface of the network.
  • Provides centralized control over network traffic policies and rules.
  • Logs and monitors all traffic, enabling incident detection and forensic analysis.
  • Prevents many types of DoS/DDoS attacks by rate-limiting or dropping malicious traffic.
  • Supports network segmentation (DMZ, VLANs) to isolate sensitive systems.
  • NGFWs provide deep application-layer visibility and user-based controls.
  • Can enforce VPN and encrypted tunnel policies for remote access security.
  • Helps meet compliance requirements (PCI-DSS, HIPAA, ISO 27001).
Disadvantages
  • Cannot stop threats that originate from inside the network (insider threats).
  • Encrypted traffic (TLS/SSL) can bypass inspection unless MITM decryption is enabled.
  • Misconfiguration is common and can leave critical gaps in protection.
  • High-performance firewalls are expensive to purchase and maintain.
  • May introduce latency, especially with deep packet inspection enabled.
  • Does not protect against social engineering or phishing targeting users directly.
  • Rule complexity grows over time and becomes difficult to manage.
  • Not effective against zero-day vulnerabilities without threat-intel integration.
04 What Firewalls Protect Against 🛡️
🌊

DoS / DDoS Attacks

Rate-limiting and SYN flood protection prevent service disruption.

🔍

Port Scanning

Detects and blocks reconnaissance activity from external scanners.

💉

SQL Injection (WAF)

WAFs intercept and block malicious SQL payloads targeting web apps.

🔗

Unauthorized Connections

Blocks access to services on unauthorized ports and protocols.

🦠

Malware C2 Traffic

Blocks outbound connections to known malicious IPs and C2 domains.

🕵️

IP Spoofing

Ingress/egress filtering detects packets with forged source IP addresses.

🚪

Backdoor Access

Prevents malware from opening reverse shells or unauthorized listeners.

📡

Data Exfiltration

Blocks outbound traffic to unapproved endpoints, limiting data leakage.

🔐

Lateral Movement

Internal segmentation firewalls limit attacker movement across the network.

05 How Firewalls Work — Core Concepts ⚙️

Rule-Based Filtering: Firewalls apply a list of ACL (Access Control List) rules evaluated top-down. Each rule specifies source IP, destination IP, port, protocol, and action (ALLOW / DENY / DROP). The first matching rule wins.

Default Deny Policy: A security best practice is to end all rule sets with an implicit "deny all" — any traffic not explicitly permitted is blocked. This is the principle of least privilege applied to networking.

Stateful Connection Tracking: Modern firewalls maintain a state table of active TCP/UDP sessions. Only packets that are part of an established, legitimate session are allowed through — this blocks many spoofing and injection attacks.

Deep Packet Inspection (DPI): NGFWs look beyond headers into packet payloads. They can identify applications by behavior (not just port), detect malware signatures, and enforce content policies even on non-standard ports.

Network Zones: Firewalls commonly enforce zone-based policies — separating the Internet (Untrusted), DMZ (Semi-trusted, for public-facing servers), and LAN (Trusted). Traffic between zones is strictly controlled.

Research Team 👥
01Youssef Ayman Gaber Ali
02Mansour Ibrahim Mansour Ahmed
03Mostafa Abdel Moez Abu Deif
04Mahmoud Mohamed Ibrahim
05Habiba Mahmoud Hassan
06Rodaina Abdullah