Free tech learning for everyone, from basics to pro

Photo: Kaffeebart on Unsplash

Tech FundamentalsBeginner

What is a firewall? A simple explanation

In short: A firewall is software or a device that sits between a network and the outside world and decides which connections are allowed, based on a set of rules. Your computer, your home router and every business network use one. A firewall blocks unwanted connections, but it cannot stop you from clicking a scam link or opening a bad attachment.

Animation: the main idea at a glance. It plays on a loop with no sound.

The short answer

A firewall is a security guard for a computer or a network. It looks at every connection trying to come in or go out and checks it against a list of rules. If the connection is allowed, it goes through. If not, it is blocked.

The name comes from buildings: a firewall is a wall that stops a fire from spreading from one part of a building to another. In computing, it stops unwanted traffic spreading from one network into another.

What a firewall does with each connectionTraffic arrivesfrom the internetor the networkCheck the ruleswho, where, whichserviceAllow or blockdecision in a splitsecondLog ita record for later
Figure 1. A firewall checks every connection against a list of rules and lets through only what is allowed.

What does a firewall check?

Every piece of data on a network travels with a label, a bit like an envelope with addresses on it. A firewall reads that label. Typical questions it asks are:

  • Where is it coming from? The sender's IP address.
  • Where is it going? Which device on your network.
  • Which service is it for? For example web pages, email or remote access. Each service uses a numbered "door" called a port.
  • Did someone inside ask for it? Replies to your own requests are allowed back in; surprise visitors usually are not.

More advanced firewalls, called next-generation firewalls, also look inside the traffic to recognise apps, block known attacks and filter dangerous websites.

Where you will find firewalls

TypeWhere it livesWhat it protects
Software firewallOn your computer (for example Windows Defender Firewall or the macOS firewall)That one device, even on public Wi-Fi
Router firewallInside your home broadband routerEvery device in your home
Network firewallA dedicated box in an office or data centreA whole business network
Cloud firewallRun by a cloud providerWebsites and services in the cloud

What a firewall cannot do

A firewall is important, but it is not a complete shield:

  • It cannot stop you from clicking a scam link or typing your password into a fake website.
  • It usually cannot see inside encrypted traffic unless it is specially set up to do so.
  • It does not remove viruses already on your device; that is the job of antivirus software (see Firewall vs antivirus).
  • A firewall with weak rules, or one that is never updated, gives a false sense of safety. Firewalls themselves need security updates too.

What you should do

  • Leave the built-in firewall on your computer switched on.
  • Keep your home router's software up to date and change its default admin password.
  • If an app asks to be allowed through the firewall and you do not recognise it, say no.
  • Be careful with "port forwarding" on your router: every rule you add opens a door from the internet to a device at home.

For businesses, firewall rules should be reviewed regularly. Old rules that nobody remembers adding are one of the most common weaknesses found in security audits.

Want to go deeper? Our notes on firewall basics and types of firewalls explain rules, stateful inspection and next-generation features.

Key takeaways

  • A firewall checks every connection against rules and allows or blocks it.
  • It looks at where traffic comes from, where it is going and which service (port) it uses.
  • Your computer, your router and business networks each have their own firewall.
  • A firewall cannot stop you clicking scam links, so it is one layer of protection, not the only one.
Verified author✓ Valid
Issued to
Mohamed Fayas
Role
Founder of FM TecHub
Credentials
CCNABTEC HND Network EngineeringBEng (Hons) Computer Networking & Cloud Security
Issuer
FM TecHub · fmtechub.com

He writes practical, plain-English guides on networking, security and cloud.

More about the author →

© 2026 FM TecHub. Original content written for FM TecHub. Share the link freely; please don't copy the text elsewhere without permission.

Email updates: coming soon

New notes, tools and security news from FM TecHub by email, explained simply. Free. We're not collecting email addresses yet; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesopening soon

Meanwhile, stay connected: