Firewalls - Full Notes
Firewalls
A firewall filters network traffic by deciding what traffic is:
β
Allowed
β Blocked
It acts as a security checkpoint between networks.
Examples:
Internal network β Internet
VLAN 20 β VLAN 30
π§ Think:
Firewall = Security Guard
It checks traffic before allowing it through.
How Firewall Rules Work
Firewall rules are processed:
Top to bottom
First match wins
Implicit deny at the end
Example:
Allow VLAN 20 β VLAN 30
Allow Web Traffic
Block Everything ElseIf traffic does not match an allow rule:
β It gets blocked.
π§ Think:
Firewall reads rules like a checklist.
Firewall Rules Match On
Firewall rules check:
Source IP address
Destination IP address
Source port
Destination port
Protocol
Example:
Allow:
Source: VLAN 20
Destination: VLAN 30
Protocol: TCP
Port: 9997Types of Firewalls
Stateless Firewall
A stateless firewall checks each packet individually.
It does not remember previous traffic.
Example:
"Does this packet match a rule?"
Benefits:
Fast
Simple
Downside:
Less secure
π§ Think:
Stateless = No Memory
Stateful Firewall
A stateful firewall remembers active connections.
It tracks:
Who started the connection
Whether traffic belongs to an existing session
Example:
Computer sends a request β Server replies
The firewall knows the return traffic is allowed.
Benefits:
Smarter
More secure
π§ Think:
Stateful = Remembers
Stateless vs Stateful
Stateless | Stateful |
|---|---|
No memory | Tracks connections |
Checks every packet | Remembers sessions |
Basic | More secure |
π§ Memory Trick:
Stateless = Stranger
Stateful = Remembers you
Next-Generation Firewall (NGFW)
A modern firewall with advanced security features.
Adds:
Application awareness
Intrusion Prevention System (IPS)
Deep Packet Inspection
It understands more than just:
IP addresses
Ports
Protocols
π§ Think:
NGFW = Smart Firewall
Proxy Firewall
A proxy firewall acts as a middleman between users and the internet.
Traffic goes:
User
β
Proxy Firewall
β
InternetIt makes requests on behalf of the user and inspects traffic.
π§ Think:
Proxy = Middleman
Firewall Locations
Network-Based Firewall
Protects an entire network.
Example:
pfSense at the network edge
π§ Think:
Network Firewall = Protects Everyone
Host-Based Firewall
Runs on an individual device.
Example:
Windows Defender Firewall
π§ Think:
Host Firewall = Protects One Device
Key Firewall Concepts
ACL (Access Control List)
A list of rules that defines what traffic is:
β Allowed
β Denied
Firewall rules are basically ACLs.
π§ Think:
ACL = Traffic Rule List
Implicit Deny
Anything that is not specifically allowed is automatically blocked.
Example:
Rules:
Allow HTTPS
Allow DNSEverything else:
β Denied
π§ Think:
Default = Block
DMZ (Demilitarized Zone)
A separate network area for public-facing servers.
Examples:
Web servers
Email servers
The DMZ keeps public servers separated from the internal network.
Example:
Internet
|
DMZ
|
Internal NetworkIf a public server gets hacked, attackers still have difficulty reaching internal systems.
π§ Think:
DMZ = Buffer Zone
Screened Subnet
Another name for a DMZ.
π§ Think:
Screened Subnet = DMZ
β Network+ Must Memorize
β
Firewall = Filters traffic
β
Rules = Top to bottom, first match wins
β
Implicit deny = Block anything not allowed
β
Stateless = No memory
β
Stateful = Tracks connections
β
NGFW = Smart firewall with advanced inspection
β
Proxy = Middleman firewall
β
Network-based = Protects whole network
β
Host-based = Protects one device
β
ACL = List of firewall rules
β
DMZ = Isolated area for public servers