Firewalls

Watch the presentation

Se presentationen på svenska

Firewalls acts as a protective barrier between trusted internal networks and untrusted external ones, such as the internet. By filtering and controlling the flow of network traffic based on predefined security rules, firewalls help prevent unauthorized access, cyberattacks, and other potential threats. Their primary function is to allow legitimate traffic while blocking any harmful or unauthorized data.

How Firewalls Work

Firewalls inspect data packets as they enter or exit a network, deciding whether to permit or block them based on a set of rules. These rules specify criteria such as source and destination IP addresses, ports, and protocols. Firewalls can operate at various layers of the network stack, from analyzing individual packets to monitoring entire network sessions and applications.

Ports and Their Relationship with Firewalls

Ports are logical endpoints used to identify services or applications that data packets are intended for. For example, web traffic typically uses port 80 for HTTP and port 443 for HTTPS. When a firewall inspects traffic, it checks the destination port to determine which service is being accessed. Firewalls can block or allow traffic on specific ports to control access to services and enhance security.

Examples of ports used by some common services

Types of Firewalls

  1. Packet-Filtering Firewalls: These basic firewalls inspect individual packets at the network layer, making decisions based on IP addresses, ports, and protocols. They do not track connections, making them limited in detecting complex threats.
  2. Stateful Inspection Firewalls: More advanced than packet-filtering firewalls, stateful firewalls monitor the state of active connections and ensure that only traffic matching an established connection is allowed.
  3. Next-Generation Firewalls (NGFWs): NGFWs include traditional firewall capabilities with added features like deep packet inspection, intrusion prevention, and application awareness. They operate at the application layer, allowing them to identify and control specific types of traffic.

Designing Firewall Rules

Firewall rules dictate the conditions under which traffic is allowed or blocked. A standard firewall rule comprises five main elements, known as the five-tuple:

Example of a Firewall Rule

Suppose a firewall rule is set to permit internal HTTP traffic from a device within the corporate network with the IP 10.0.1.25 to reach an internal web server with the IP 10.0.2.50. This rule would be defined as follows:

This rule allows traffic from 10.0.1.25 (e.g., an employee’s workstation) to access the internal web server at 10.0.2.50 over port 80. Any traffic that does not match this rule would be blocked by default, ensuring that only permitted internal traffic can access the web server while maintaining security controls across the corporate network.

Types of Firewall Rules

Best Practices for Firewall Management

Implementing effective firewall rules requires a strategic approach:

Conclusion

Firewalls are essential for securing networks by filtering traffic and enforcing access control. Understanding how they function and how to design effective firewall rules is critical for protecting an organization’s network from unauthorized access and cyber threats.