Firewall
A firewall is a software or hardware filter that monitors, controls, and restricts incoming and outbound traffic: a network barrier that blocks unauthorized access. Learn how firewalls work, the main types, and how they fit into a layered defense.
What is a firewall?
A firewall is a security control placed between networks, or between a device and a network, that decides which traffic is allowed through. It applies a set of rules based on details such as source and destination addresses, ports, protocols, applications, and users. Traffic that does not match an allowed rule is blocked.
How does a firewall work?
Firewalls inspect traffic at different depths:
- Packet filtering checks each packet's addresses, ports, and protocol against rules.
- Stateful inspection tracks active connections and allows replies that belong to a connection already permitted.
- Proxy or application-level filtering examines traffic for a specific application, such as web requests.
- Next-generation firewalls add application awareness, user identity, intrusion prevention, and threat intelligence.
Firewalls can be network appliances, virtual appliances in the cloud, or software running on each computer. Most rule sets start from "deny by default" and allow only the traffic that is needed.
Firewall vs. antivirus
A firewall controls which network connections are allowed. Antivirus software looks for malicious files and programs on a device. They address different problems and work best together, along with other controls such as access management and monitoring.
Why does a firewall matter?
Firewalls reduce the attack surface by keeping unnecessary services unreachable and by separating networks, such as user devices from servers. Their value depends on the rules: overly broad rules, forgotten temporary exceptions, and remote access ports left open to the internet are common weaknesses. Reviewing rules regularly keeps them aligned with what is actually needed.
Firewall logs are also a useful record of blocked and allowed connections, which helps teams investigate incidents and spot scanning or unusual outbound traffic.
Frequently asked questions
What is a firewall?
A firewall is a software or hardware filter that monitors, controls, and restricts incoming and outbound traffic, acting as a network barrier against unauthorized access.
What is the difference between a network firewall and a personal firewall?
A network firewall protects a whole network segment at its boundary. A personal (host-based) firewall runs on a single computer and controls that device's traffic.
Can a firewall stop all attacks?
No. A firewall controls network traffic, but it cannot stop attacks that use allowed connections, stolen credentials, or malicious files. It is one layer among several.
Reach internal resources without opening your network
Secure remote access to segmented networks, no VPN required.
Related terms
Proxy server
A proxy server is a system that intermediates between a client and a server as a protection layer.
Read now →Network-Based Intrusion Detection System (NIDS)
A Network-Based Intrusion Detection System (NIDS) is a system that audits traffic on a network to detect malicious activity.
Read now →