what does a firewall do
A firewall is a security system that sits between networks (like your home network and the internet) and decides which traffic is allowed through and which is blocked, based on security rules.
Quick Scoop: What a Firewall Does
Think of a firewall as a bouncer for your network: it checks every “person” (data packet) trying to get in or out and decides whether to let it pass.
Key jobs of a firewall:
- Monitors all incoming and outgoing network traffic.
- Filters traffic using predefined security rules (who can talk to whom, on which port, using which protocol).
- Blocks suspicious or clearly malicious traffic (like hacking attempts, malware, or strange connections).
- Helps stop unauthorized access to your devices and data.
- Can enforce policies, like blocking certain websites or apps (e.g., social media on an office network).
How It Works (In Simple Terms)
When data moves across a network, it’s broken into packets. The firewall inspects those packets and makes a decision:
- Look at the packet details
- Source IP (where it comes from).
- Destination IP (where it’s going).
- Port and protocol (what kind of traffic it is, like web, email, remote desktop).
- Compare with rules
- Example rules: “Allow web traffic from inside to the internet,” “Block all unknown incoming connections,” “Deny traffic to these dangerous IP addresses.”
- Decide: allow, block, or sometimes quarantine
- Allowed: safe, expected traffic.
- Blocked: suspicious, dangerous, or disallowed by policy.
- Quarantined/flagged: needs extra inspection by security tools or admins.
What Does a Firewall Protect You From?
Modern firewalls help defend against a wide range of threats:
- Unauthorized access by hackers.
- Malware and ransomware trying to contact command-and-control servers.
- Scans and probes that look for vulnerable devices.
- Some phishing or malicious web connections.
- Lateral movement inside a network (attackers jumping from one machine to another).
They don’t replace antivirus or safe browsing habits, but they are a core layer of network defense.
Types of Firewalls (High-Level)
You’ll often see firewalls described in two main ways.
By delivery:
- Hardware firewall: A physical device (or built into your router) that protects whole networks.
- Software firewall: An app or OS feature on a single device (like the firewall in Windows or macOS).
By how they operate:
- Packet-filtering / stateless: Looks at each packet individually against rules.
- Stateful inspection: Tracks active connections and understands context, not just one packet at a time.
- Next-generation firewall (NGFW): Adds deep packet inspection, app awareness, content filtering, and threat intelligence (e.g., blocking known bad IPs/domains).
Layered Use in Today’s Networks
In 2020s and mid‑2020s networks, firewalls aren’t only at the internet edge; they’re sprinkled throughout:
- At the perimeter: Between your internal network and the internet.
- Between internal segments: Separating sensitive zones (finance, HR, servers) from general user networks.
- In the cloud: Protecting virtual networks and cloud workloads.
This segmentation limits damage if an attacker gets in, because other parts of the network are still shielded by additional firewalls.
Mini Example
Imagine your laptop at home:
- You open a browser and visit a website.
- Your request goes out; the firewall sees it’s an allowed outbound web connection and lets it pass.
- The website’s response comes back; the firewall recognizes it as part of your existing allowed session, checks it against rules, and then lets it through.
- If a random machine on the internet suddenly tries to open a remote connection to your laptop, the firewall blocks it because it’s unsolicited and doesn’t match any safe rule.
Why You Still Need One
Even with secure apps and encryption, a firewall remains critical:
- It reduces your attack surface by closing unnecessary “doors” (ports/services).
- It enforces who and what can talk across networks.
- It works together with other tools (antivirus, intrusion detection, endpoint security) to build a layered defense.
In short, a firewall is your network’s gatekeeper: it watches everything coming in and going out and blocks what shouldn’t be there.
Information gathered from public forums or data available on the internet and portrayed here.