Skip to content
SpeedTestGO

What Is a Firewall? Types, How It Works and Limits

Shawn Stolting

2 min read

Published Updated

Short answer

A firewall allows or blocks network traffic based on rules, usually blocking unsolicited incoming connections. It protects the connection, not you from malware you install or phishing.

What Is a Firewall: Enhancing Network Security and Protecting Your Data
In this article (5 sections)
  1. What a firewall does
  2. Types of firewall
  3. What a firewall does not do
  4. Firewalls and your home network
  5. FAQs

A firewall is software or hardware that decides which network traffic is allowed in or out, based on rules. It sits between your device or network and the internet, and blocks connections that do not match what you have permitted. A good default is to block unsolicited incoming traffic and allow what you started yourself.

What a firewall does

Every connection has a source and destination address, a port and a protocol. The firewall checks those against its rules and then allows or drops the traffic. Most home firewalls follow a simple pattern: deny incoming connections you did not ask for, allow outgoing ones.

Types of firewall

TypeHow it decidesUsed in
Packet filter (stateless)Looks at each packet's address, port and protocol on its ownBasic router rules and older gear
Stateful inspectionTracks connections, so it only lets in replies to traffic you startedNearly all home routers and operating systems
Application or proxy firewallUnderstands the application protocol and can filter contentOffices, web filters, school networks
Next-generation firewall (NGFW)Adds app awareness, intrusion prevention and threat feedsBusinesses and data centers
Web application firewall (WAF)Protects a website from attacks such as SQL injectionWebsites and APIs

They also differ in where they run. A network firewall is built into your router or a dedicated box and protects everything behind it. A host firewall runs on one computer: Windows Defender Firewall on Windows and the built-in firewall on macOS. Using both is sensible, since the host firewall also protects you on café or hotel Wi-Fi where no router firewall is yours.

What a firewall does not do

  • It does not stop you from installing malware that you chose to download.
  • It does not catch phishing messages or fake login pages.
  • It does not encrypt your traffic. For that, use HTTPS and, on untrusted Wi-Fi, a VPN.
  • It cannot protect you if you open a port you do not need or turn it off.

Think of it as a locked front door. It is essential, but it does not replace updates, strong passwords and care with links and attachments.

Firewalls and your home network

Your home router already filters unsolicited inbound traffic by default, which is why devices at home are not directly reachable from the internet. Opening a port for a game server or camera makes a hole in that protection. Open only what you need, keep the router firmware updated, and close ports you no longer use. If forwarding does not work at all, you may be behind a second router, see double NAT.

Quick checklist

  1. Keep the Windows or macOS firewall switched on.
  2. Log in to your router and make sure remote administration is off unless you need it.
  3. Remove port forwards you do not use.
  4. Update router firmware and change the default admin password.
  5. Use a VPN on public Wi-Fi.

Schools and workplaces use firewalls to block sites, which is a different job from protecting you. Our post on school firewalls covers that side. For wireless safety at home, see how to secure your Wi-Fi network.

FAQs

What is a firewall in simple terms?
A filter between your device or network and the internet that allows or blocks traffic using rules. By default it blocks incoming connections you did not ask for and allows the ones you started.
Do I need a firewall if I have antivirus?
Yes. They do different jobs. A firewall controls network connections. Antivirus looks for malicious files and behavior on the device. Windows and macOS include a firewall that you should leave on.
Does my router have a firewall?
Yes. Most home routers include a stateful firewall that blocks unsolicited inbound traffic by default. Port forwarding and DMZ settings can weaken it, so use them sparingly.
What is the difference between a hardware and a software firewall?
A hardware (network) firewall is built into a router or separate device and protects the whole network. A software (host) firewall runs on one computer and protects only that device, including on other networks.
Can a firewall slow down my internet?
Normally not at home. Basic filtering adds almost no delay. Heavy inspection on a weak device, such as deep packet inspection on an old router, can reduce speeds on fast connections.
Read nextHow to Secure Your Wi-Fi Network: A Practical ChecklistTry itInternet Speed TestDownload, upload, ping and jitter in about half a minute.