How Does a Firewall Filter Traffic?

Firewall traffic controls in a network operations room

Firewall Explainer

A firewall is a security control that decides which network traffic is allowed to pass between systems. It can run on a computer, a router, a dedicated security appliance, or a cloud service.

Firewall rules often examine details such as the source and destination address, the network port, the protocol, and the connection’s state. A rule may allow routine web traffic, block an unneeded service, or limit access to a known group of systems.

Many modern firewalls are stateful, meaning they remember whether a connection was started in an expected way. Some also inspect traffic more closely for patterns associated with threats, though deeper inspection can add processing overhead.

A firewall is not a guarantee that every threat will be stopped. Secure devices, careful access rules, updates, and monitoring remain necessary because harmful activity can sometimes travel through traffic that a firewall is allowed to pass.

A firewall applies security rules to network traffic. It can allow, block, or limit connections based on details such as addresses, ports, protocols, and connection state.

Rules can check who is sending and receiving traffic, what service is being used, and whether the connection looks expected. The exact checks depend on the firewall and its policy.

No. A firewall helps reduce exposure, but it cannot protect against every unsafe action or every threat that uses allowed traffic. It should be part of a larger security approach.

Explore more "Explainers"

Discover additional explainers across politics, science, business, technology, and other fields. Each explainer breaks down a complex idea into clear, everyday language—helping you better understand how major concepts, systems, and debates shape the world around us.