IP, Privacy & Security
What Is a Firewall?
A firewall is a gatekeeper for network traffic, deciding what's allowed through and what's blocked. It's one of the oldest and most important security tools.
The gatekeeper
A firewall monitors network traffic and allows or blocks it according to a set of rules. It sits at a boundary — between your device and the network, or between your network and the internet — and enforces a simple principle: only permit traffic that should be there.
What the rules look at
Firewall rules typically make decisions based on:
- IP addresses — allow or block traffic to and from certain addresses or ranges.
- Ports — permit only the services you intend to expose (say, web traffic) and block the rest.
- Direction — treat inbound and outbound traffic differently; most home setups block unsolicited inbound connections.
- Connection state — allow replies to connections you started, while blocking unexpected new ones.
Types of firewall
- Packet filters — the basic form, judging each packet by its headers.
- Stateful firewalls — track ongoing connections, so replies are allowed but unsolicited traffic isn't. This is what most routers and operating systems use.
- Application (next-gen) firewalls — inspect traffic more deeply, understanding specific applications and threats.
You already have several
Firewalls aren't just for corporations. Your home router includes a basic firewall that, combined with NAT, blocks unsolicited inbound traffic by default. Your operating system has a software firewall too. Together they form layered defense — the principle that multiple barriers are safer than one.
Firewalls and your IP
Because firewalls decide who can reach what, they're closely tied to IP addresses and ports. When you set up port forwarding to host a game, or when a service "whitelists" your address, you're working with firewall rules. Understanding them turns network security from a black box into something you can reason about and control.