
A firewall is a security system that monitors network traffic and decides what to allow through and what to block based on a set of rules — acting as a barrier between your trusted device or network and the untrusted internet. It’s one of the oldest and most fundamental security tools, and you’re almost certainly using one right now. Here’s how firewalls work, the main types, and whether you need to think about one.
Reviewed and kept current by the Coppers.io editorial team — see how we research .
What a firewall does
Every connection to and from your device or network is a packet of data. A firewall inspects this traffic and applies rules to allow, block, or restrict it — based on details like source and destination address, port, and protocol. The goal is to keep unauthorised or malicious traffic out (and sometimes control what goes out), while letting legitimate traffic flow.
Think of it as a security guard at the entrance, checking everything that tries to come in or out against a list of rules.
How firewalls work
Firewalls filter traffic using one or more techniques:
- Packet filtering — checks each packet’s basic details (addresses, ports) against rules.
- Stateful inspection — tracks active connections and allows return traffic for ones you started, while blocking unsolicited inbound connections.
- Proxy / application-level — inspects traffic for specific applications more deeply.
- Next-generation firewalls (NGFW) — add intrusion prevention, deep packet inspection, and app awareness.
Types of firewall
- Hardware firewalls — a physical device (often built into your router) protecting an entire network at the perimeter.
- Software firewalls — run on an individual device (Windows and macOS both include one) to protect that machine.
- Cloud firewalls — delivered as a service to protect cloud infrastructure.
Most homes are protected by both a router’s hardware firewall and the software firewall built into each device — defence in depth.
Firewall vs antivirus vs WAF
These get muddled, but they protect different things:
| Tool | Protects against |
|---|---|
| Firewall | Unauthorised network traffic in and out |
| Antivirus / anti-malware | Malicious files and programs on your device |
| WAF | Web-application attacks (SQLi, XSS) on a website |
A regular firewall guards the network layer; a web application firewall is a specialised cousin that protects websites at the application layer. You generally want a firewall and anti-malware — they’re complementary.
Do you need a firewall?
Almost certainly yes — and you probably already have one. For everyday users:
- Keep your device’s built-in firewall on (it’s on by default in Windows and macOS).
- Your home router’s firewall adds network-level protection — keep its firmware updated.
- You usually don’t need extra firewall software beyond what’s built in, unless you have specific needs.
For businesses, firewalls are essential infrastructure, often next-gen models combined with other controls. The US CISA lists keeping firewalls and software updated among core security habits, alongside the broader cybersecurity basics .
A firewall isn’t everything
A firewall controls traffic — it won’t stop you installing malware , falling for phishing , or using weak passwords. It’s one layer in a defence-in-depth stack that also includes anti-malware, updates, strong authentication, and good habits. On public networks, pair it with a VPN for encryption.
The bottom line
A firewall monitors network traffic and blocks anything that doesn’t meet its rules, forming a barrier between your device or network and the internet. You’re almost certainly already protected by one in your router and your operating system — keep them enabled and updated. Just remember a firewall is one layer: combine it with anti-malware, updates, and strong passwords for real security.
FAQs
- A firewall is a security barrier that watches the traffic going to and from your device or network and blocks anything that doesn't meet its rules. It keeps unauthorised or malicious connections out while letting legitimate traffic through.
- It inspects each packet of network traffic and applies rules based on things like address, port, and protocol to allow or block it. Stateful firewalls also track active connections, permitting replies to traffic you started while blocking unsolicited inbound attempts.
- Hardware firewalls protect a whole network at the perimeter (often built into your router), software firewalls protect a single device (Windows and macOS include one), and cloud firewalls protect cloud infrastructure as a service. Many setups use more than one.
- Yes, and you almost certainly already have one. Your router includes a hardware firewall and your operating system has a software firewall enabled by default. Keep both on and your router firmware updated; extra firewall software usually isn't necessary for home users.
- A firewall controls network traffic, blocking unauthorised connections. Antivirus (anti-malware) scans for and removes malicious files and programs already on your device. They protect different things and work best together as part of layered security.
