AEGIS

AEGIS CORE

AEGIS COREIntelligence Docsunderstanding-firewalls

Understanding Firewalls: Types, Functions, and Best Practices

Classification: PUBLIC
Category: Network Security
Reading Time: 4 min


What Is a Firewall?

A firewall is a network security device or software that monitors and controls incoming and outgoing network traffic based on predetermined security rules. It establishes a barrier between a trusted internal network and untrusted external networks, such as the internet.

Firewalls have been a fundamental component of network security since the late 1980s, and they remain one of the most critical defenses in any organization's security infrastructure.

Types of Firewalls

Packet Filtering Firewalls

The simplest type of firewall, packet filtering examines each packet of data and compares it against a set of rules. These rules typically include source and destination IP addresses, port numbers, and protocols (TCP, UDP, ICMP). If a packet matches a permitted rule, it passes through; otherwise, it is dropped.

Limitation: Packet filters cannot inspect the payload of packets, making them vulnerable to attacks hidden within allowed traffic.

Stateful Inspection Firewalls

Stateful firewalls track the state of active network connections and make decisions based on the context of the traffic, not just individual packets. They maintain a state table that records information about every connection passing through the firewall.

This approach is significantly more secure than simple packet filtering because it can detect and block illegitimate packets that attempt to exploit existing connections.

Application Layer Firewalls (WAF)

Web Application Firewalls operate at Layer 7 of the OSI model, inspecting HTTP/HTTPS traffic to detect and block web-based attacks. They can identify and mitigate threats like SQL injection, cross-site scripting (XSS), and file inclusion attacks.

Next-Generation Firewalls (NGFW)

NGFWs combine traditional firewall capabilities with advanced features such as deep packet inspection (DPI), intrusion prevention systems (IPS), and application awareness. They can identify and control applications regardless of the port or protocol used.

Firewall Best Practices

  1. Default Deny Policy — Block all traffic by default and only allow explicitly permitted connections
  2. Regular Rule Audits — Review and clean up firewall rules at least quarterly to remove outdated or redundant entries
  3. Network Segmentation — Use internal firewalls to segment your network into zones, limiting lateral movement in case of a breach
  4. Logging and Monitoring — Enable comprehensive logging and regularly review firewall logs for suspicious activity
  5. Firmware Updates — Keep firewall firmware and software up to date to patch known vulnerabilities

Common Misconfigurations

Many security breaches occur not because firewalls fail, but because they are misconfigured. Common mistakes include overly permissive rules, disabled logging, using default credentials, and failing to restrict outbound traffic.

A properly configured firewall, combined with regular audits and monitoring, remains one of the most effective defenses against network-based attacks.


Aegis Core provides network analysis tools that can help you understand your network's exposure. Try our IP Intelligence tool to analyze IP addresses and their associated infrastructure.

Information provided for educational and defensive purposes only.