A firewall is a security device or piece of software that monitors network traffic and decides, according to a set of rules, what is allowed in and out. Think of it as a gatekeeper between your internal network, such as your computers and servers, and the outside world. Its job is to block unauthorised access while letting legitimate traffic through.
How a firewall works
- Traffic filtering. The firewall inspects data packets, the small chunks of data that travel to and from your network, and compares them with its rules to decide whether to allow or block them.
- Access control. It stops unauthorised users, attackers and malicious software from reaching systems they should not reach.
- Monitoring and logging. It records traffic patterns and can alert you to suspicious activity.
Why firewalls matter
- Protection against attacks. A firewall blocks many attempts to reach your systems from the internet, including scans and known malicious sources.
- Safer sensitive data. It helps keep personal data, financial records and intellectual property away from people who should not see them.
- Compliance. Standards such as PCI DSS and ISO/IEC 27001 expect network traffic to be controlled, and a firewall is usually the main control.
Watch: what a firewall does
The main types of firewall
1. Packet-filtering firewalls
The most basic type. It checks each packet on its own and allows or blocks it based on IP addresses, ports and protocols.
- Best for: home networks and very small offices where speed and simplicity matter most
- Strengths: fast, cheap and easy to set up
- Limits: no deep inspection, so it misses sophisticated threats
2. Stateful inspection firewalls
These track the state of each connection, so they only allow traffic that belongs to a legitimate, established session.
- Best for: small and medium-sized networks that need a balance of security and performance
- Strengths: more secure than simple packet filtering
- Limits: uses more resources and can struggle under very heavy traffic
3. Proxy firewalls (application-level gateways)
A proxy firewall sits between your users and the internet. It receives traffic on their behalf, inspects it and passes it on only if it is safe.
- Best for: organisations that need close inspection of application traffic
- Strengths: deep inspection, and it hides internal network details from the outside
- Limits: can add delay, and needs more configuration and maintenance
4. Next-generation firewalls (NGFWs)
An NGFW combines traditional filtering with application control, intrusion prevention and deep packet inspection, including inspection of encrypted traffic. It is built for modern, targeted attacks.
- Best for: organisations with complex networks that need control by application and user
- Strengths: broad protection and detailed policy control
- Limits: costs more and needs skilled people to configure and manage
5. Cloud firewalls (firewall as a service)
These are delivered from the cloud and protect cloud workloads, remote staff and branch offices without a box on every site.
- Best for: organisations with remote teams or applications in the cloud
- Strengths: easy to scale and quick to roll out
- Limits: depends on internet connectivity and may need integrating with on-premises equipment
6. Unified threat management (UTM) firewalls
A UTM appliance bundles a firewall with antivirus, spam filtering, web filtering and VPN in one device.
- Best for: small and medium-sized businesses that want one box to manage
- Strengths: simple to manage, with several controls in one place
- Limits: each feature may be less capable than a dedicated product, and turning everything on can slow the device
Watch: the different types of firewall
Which firewall is right for you?
- Home users and very small offices: a packet-filtering or stateful firewall, often built into a good router
- Small and medium-sized businesses: a UTM or an entry-level NGFW
- Larger organisations: NGFWs, sized for your traffic and managed by people who know them
- Remote and cloud-first teams: a cloud firewall, often as part of a SASE design
Whichever you choose, a firewall is only as good as its rules. Review them regularly, keep the firmware up to date and make sure someone is watching the logs.