Understanding Firewalls: Your First Line of Defence

Published 10:00 am 5 May, 2024  •  6 mins read  •  3.2k views

Last updated 12 August, 2025

A firewall is the gatekeeper of your network. It monitors incoming and outgoing traffic and decides — based on a defined set of security rules — whether to allow or block specific packets. Every enterprise network, cloud deployment, and even your home router relies on some form of firewall technology.

Firewall Architecture
Firewall Architecture

Think of it this way: A firewall is like the security guard at a building entrance. It checks every person (packet) against a list (rules) and only lets through those who are authorized.

Types of Firewalls

TypeHow It WorksBest For
Packet FilteringInspects headers (IP, port, protocol) of each packetBasic network perimeter security
Stateful InspectionTracks active connections and makes decisions based on stateEnterprise LAN/WAN boundaries
Proxy FirewallActs as intermediary; makes requests on behalf of clientsWeb traffic filtering and caching
Next-Gen Firewall (NGFW)Deep packet inspection + IPS + application awarenessModern enterprise security
WAF (Web Application)Protects web apps from HTTP-layer attacks (SQLi, XSS)E-commerce, SaaS platforms

Writing Your First Firewall Rule

Let's say you want to allow HTTP traffic (port 80) from your internal network (192.168.1.0/24) to the internet, but block everything else. Here's what that looks like conceptually:

  • Rule 1: ALLOW | Source: 192.168.1.0/24 | Dest: ANY | Port: 80 | Protocol: TCP
  • Rule 2: ALLOW | Source: 192.168.1.0/24 | Dest: ANY | Port: 443 | Protocol: TCP
  • Rule 3: ALLOW | Source: ANY | Dest: 192.168.1.0/24 | State: ESTABLISHED | Protocol: TCP
  • Rule 4 (Default): DENY | Source: ANY | Dest: ANY | Port: ANY | Protocol: ANY

Common Firewall Mistakes

  • Leaving default 'allow all' rules active — always start with deny-all and whitelist
  • Not logging denied traffic — logs are critical for incident response and forensics
  • Ignoring outbound rules — exfiltration happens through outbound connections
  • Not updating firmware — firewall vendors patch vulnerabilities regularly
  • Over-permissive rules like 'allow any any' for convenience — a single lazy rule can negate all others

At CCN, students configure real Cisco ASA firewalls, pfSense appliances, and cloud-native security groups (AWS, Azure) as part of the networking curriculum. Understanding firewalls isn't optional — it's foundational.

Ashish Kumar Saini

Published by

Ashish Kumar Saini

Chat with us ✨