No history yet

Firewall Basics

The Digital Gatekeeper

Think of a firewall as a security guard for your computer network. It stands at the gateway between your private internal network and the public internet, deciding what traffic is allowed to enter and what is blocked. Its main job is to create a barrier between a trusted network and an untrusted one.

A firewall is a security device or software that monitors and controls incoming and outgoing network traffic based on predetermined security rules.

Without a firewall, any device on the internet could potentially connect to your computer or network, leaving it vulnerable to attacks. By establishing a set of rules, a firewall can block malicious traffic, prevent unauthorized access, and keep your data safe.

Zones of Trust

To manage security effectively, networks are divided into areas with different levels of trust. These are called security domains. A firewall is the device that enforces the boundaries between these domains.

The most common domains are:

  • Internal/Trusted Zone: This is your private local network (LAN). It's where your personal computers, servers, and other sensitive devices live. You generally trust the devices in this zone.
  • External/Untrusted Zone: This is the public internet. You should inherently distrust traffic coming from this zone.
  • Demilitarized Zone (DMZ): This is a buffer zone between the trusted and untrusted networks. It's where you place servers that need to be accessible from the internet, like a web server or email server. If a device in the DMZ is compromised, the firewall prevents the attacker from accessing the internal network.

By designing a network with these domains, you can create layers of security. The firewall acts as the checkpoint, inspecting every packet of data that tries to cross from one domain to another and enforcing your security rules.

Types of Firewalls

Not all firewalls are created equal. They have evolved over time, becoming more sophisticated. Let's look at a few key types.

Packet Filtering Firewall

noun

The most basic type of firewall. It works at the network layer, making decisions based on the source and destination IP addresses, ports, and protocols in a packet's header.

These firewalls are also known as stateless firewalls. They examine each packet in isolation and don't know anything about the context of the traffic. They're fast and efficient but offer limited security because they don't understand the state of a connection.

Imagine a ticket taker who checks every ticket but doesn't remember who has already entered. A stateless firewall is similar; it checks each data packet's credentials without any memory of previous packets.

More Advanced Firewalls

As attacks became more complex, firewalls had to get smarter. This led to the development of stateful and proxy firewalls.

Stateful Firewalls: Smarter siblings that track connection states (e.g., SYN, ACK in TCP handshakes). They maintain a state table to allow return traffic only for established sessions, blocking spoofed or incomplete ones.

A stateful firewall understands the context of a conversation between two computers. For example, if your computer initiates a connection to a website, the firewall remembers this. When the website sends data back, the firewall knows it's part of an established, legitimate conversation and allows it through. This makes it much harder for attackers to send unsolicited, malicious packets to your network.

Another type is the Proxy Firewall. This firewall acts as an intermediary, or a 'proxy,' for traffic between your internal network and the internet. Instead of your computer connecting directly to a website, it connects to the proxy firewall, and the proxy firewall connects to the website on your behalf. This hides your internal network's IP addresses from the outside world and allows for deep inspection of the traffic content itself, providing a very high level of security.

Lesson image

The latest evolution is the Next-Generation Firewall (NGFW). These combine the features of stateful firewalls with more advanced security functions. NGFWs can identify specific applications, not just ports and protocols. For example, it can distinguish between general web traffic and traffic from a specific social media app.

Advantages of NGFWs include:

  • Application Awareness: Control access to specific applications, like blocking video streaming while allowing general web browsing.
  • Intrusion Prevention Systems (IPS): Actively scan for and block known security threats and exploits.
  • Deep Packet Inspection (DPI): Look inside the data portion of a packet to identify malware or sensitive information being sent out.
  • Threat Intelligence Integration: Can be updated in real-time with information about new and emerging threats.

Understanding these fundamental firewall concepts is the first step toward building a secure and resilient network.