Home > Broadband Guides > Wifi and Networking > What is a firewall?

What is a firewall?


The world of construction invented firewalls to prevent fire spreading from one area of a building to another. Similarly, the world of cybersecurity has firewalls of its own. But instead of preventing the spread of fires, it prevents malicious traffic from entering and spreading throughout your internal network.

What is a firewall?

A firewall is a cybersecurity tool that filters incoming and outgoing traffic. Its main purpose is to establish a barrier between your internal network (i.w., your device) and external traffic - what comes from the internet.

But why is this necessary?

The reason a firewall is necessary is because there's a lot of malicious traffic on the internet - from malware and viruses to hackers trying to take over your system. A firewall provides network security by blocking threats and preventing unauthorised access.

How do they work?

External traffic can only access your private network through your device's entry points - known as a port. The firewall is located at these entry points and “guards” the traffic.

The firewall either blocks or allows data through based on a defined set of rules called 'access control lists'. These rules can be based on IP addresses, domain names, keywords, ports, protocols, and programs.

How does a firewall protect me?

Firewalls offer protection by filtering internet traffic. This filtering is based on access control lists (rules) which will either be pre-configured or set manually. By default, a firewall tends to block anything that either isn't known to be safe or anything that doesn't have permission to access.

For example, if an outside entity tries to connect to your laptop, the firewall might automatically block that entity from connecting because they aren't a trusted user.

However, although a firewall is an important tool in bolstering and protecting your home network from external threats, they are not impenetrable. For example, if you were to click on a suspicious link contained within an email resulting in you accidentally downloading malware (malicious software) to your computer, the malware could penetrate the firewall and infect your device.

Types of firewalls

There are two main types of firewalls: hardware and software.

Hardware firewalls

Hardware firewalls are physical devices that behave as the first line of defence for your computer network. One example of a hardware firewall is your router. The router you have likely has its own firewall already built-in.

Generally speaking, hardware firewalls work by examining the data that travels in from the internet and verifies whether this data is safe. Simple firewalls - known as ‘packet filters’ - examine the data for certain information such as the source of the data and its location. The information gathered by the firewall is then compared to a usually pre-configured set of rules (access control lists) in order to determine whether that data should be blocked or allowed through.

Because they require little-to-no set-up, hardware firewalls are particularly beneficial for homes and small businesses.

However, because home-use hardware firewalls only examine the data coming in to a device and not the data going out, they are susceptible to attacks within the system.

Software firewalls

Software firewalls are installed on devices, and only protect whichever devices they’ve been installed on, rather than the network as a whole.

Unlike hardware firewalls, software firewalls can also monitor outgoing data traffic. They’re also customisable, meaning that rules can be configured to meet your individual needs. For example, if you needed to ease certain restrictions when gaming online or accessing certain content.

However, because software firewalls can only protect the device they've been installed on, they’re more suited to individuals rather than businesses or large corporations.

Additionally, many software firewall products are not compatible with Windows, Mac, Android, or iOS devices. This means that if you have a number of devices you want to install a software firewall on, you might need to install different products `across these devices. This can become costly and inconvenient to maintain.

Combined hardware and software firewalls

Combining a hardware and software firewall can be a good idea. Doing so will add layers of protection that will help keep your device safe.

The hardware firewall will not slow your computer down, and will add protection to game consoles and other network devices. From there, each of your devices can add on its own dedicated software firewall to offer content-based protection.

Combining hardware and software firewalls is a popular option for parents of young children. This is because while parents may not require much filtering on their own devices, they want to protect their children from potentially dangerous content on the internet.

How to enable and configure your wireless router's built-in firewall

Most wireless routers - even the ones you receive from your broadband provider - contain a built-in firewall. But to make use of it, you'll first need to activate it.

Depending on your router, the steps may vary slightly, but as a general guide, the way to enable and configure your built-in firewall is as follows:-

  1. Access your router's configuration page (Open a web browser, type your router's IP address in the address bar, then press Enter. See below on how to find the IP address of your router.)
  2. Find an entry which will should labeled something like SPI Firewall or Firewall.
  3. Select Enable.
  4. Click Save and then Apply.
  5. Your router will then likely say it is going to restart so that it can apply the new settings.
  6. Personalise the configuration settings on your firewall by selecting rules and control lists that meet your privacy and connectivity needs.

How to find the IP address of your router on Windows

1. Right-click the Windows icon located at the the bottom-left of your screen, and select "Command Prompt."

2. In the Command Prompt window, type "IPCONFIG". Press Enter.

3. Find the "Default Gateway" section. The number listed here is your router's IP address.

How to find the IP address of your router on Mac

1. Click the Apple icon at the top-left of the screen and select "System Preferences."

2. Click "Network."

3. In the list on the left side of the window, choose your network and then click "Advanced" at the bottom-right of the window. 

4. Click "TCP/IP." Your router's IP address will be listed next to "Router." 

What's the difference between a firewall and antivirus?

There are a few key differences between firewalls and antivirus:

Basis for contrastFirewallAntivirus
DefinitionA firewall is a tool that provides network security by filtering incoming and outgoing network traffic based on a set of user-defined or pre-configured rules.Antivirus is a kind of software used to scan for, detect, and delete malicious software from a computer.
ImplementationSoftware and HardwareSoftware only
ConcernsExternal threatsInternal and External threats
ThreatsBecause firewalls deal primarily with exterior network interactions, they are vulnerable to external threats such as IP spoofing and routing attacks.Once malicious software (malware) has been removed, there is no possibility of a counter-attack.

To summarise, firewalls help protect a network from external threats (e.g., hackers) by denying unauthorised requests and connections to the devices on that network. 

An antivirus’ primary function is to scan your computer for corrupt files or software, and to then quarantine them so that they can no longer cause any damage. You then have the option to delete these infected files or software so that your system becomes safe to use again. 

Should I use an antivirus with a firewall?

If you want to protect your computer as much as possible, it's a good idea to have both a firewall and antivirus software. There are a couple of reasons for this:

A firewall doesn't provide complete protection

Sometimes, if not configured properly, your firewall may have difficulty filtering your internet traffic correctly. In these instances, the rules - or 'access control lists' - that have been implemented, are not strict enough.

Additionally, hardware-related limitations or failure to keep on top of available updates can result in your firewall behaving sub-optimally. This then means that malicious software can more easily end up on your computer. If this happens, it is important to prevent or limit the damage this software can do, which is where an antivirus can help.

Antivirus software cannot detect all malware

Similar to a firewall on its own, antivirus software by itself cannot guarantee complete protection.

Although good antivirus software employs techniques to detect and isolate threats and corrupted files, it can sometimes fail. Because new types of malware are being deployed constantly, your antivirus - even if it is up-to-date - may miss certain viruses.


Neither a firewall nor antivirus software will work perfectly by themselves. To protect your computer as much as possible, it is important to have both reliable antivirus software and a firewall installed.

Compare broadband deals

We find deals from all the top providers and help you switch.