What is Firewall?
A device or program that decides which network traffic is allowed through, using rules about addresses, ports and protocols. Firewalls enforce the boundary between networks with different levels of trust, and their logs show what was blocked.
A firewall applies an ordered rule set to traffic: allow this source to reach that port, deny everything else. Modern firewalls track connection state, so a reply is allowed back in without a separate rule, and "next-generation" firewalls also identify applications and users rather than just ports. They exist at the network edge, between internal segments, and on each host. Good practice is default deny: block everything and allow only what a business need justifies. The common failures are rule sprawl (years of "temporary" exceptions nobody removes), overly broad "any" rules, and assuming the perimeter is enough when most attacks now arrive through allowed paths such as email and the web.
Source: NIST CSRC Glossary (NIST SP 800-41 Rev. 1).
Practice it in a lab
Free, hands-on labs that teach Firewall. 38 more labs also cover it.
- Set up a host firewall with UFW (beginner, ~20 min)
- Build a three-zone network in namespaces and prove the firewall policy with tests (intermediate, ~75 min)
- Compare a firewall's effective zone reachability with the intended policy (intermediate, ~40 min)
- Detect a port scan from firewall logs and tune the threshold (intermediate, ~60 min)
- Detect Windows Firewall tampering from the firewall's own change events (intermediate, ~75 min)
- Find shadowed and redundant firewall rules with a Python analyzer (intermediate, ~50 min)
- Set up a pfSense firewall in a lab (a real network gateway you own) (intermediate, ~2 hours (mostly two VM installs running in the background))
- Sweep your own Google Cloud project for public buckets, open firewall rules and external IPs (GCP assessment 3 of 5) (intermediate, ~55 min)
Related terms
Related
- Set up a host firewall with UFW
- Build a three-zone network in namespaces and prove the firewall policy with tests
- Compare a firewall's effective zone reachability with the intended policy
- Detect a port scan from firewall logs and tune the threshold
- Detect Windows Firewall tampering from the firewall's own change events
- Find shadowed and redundant firewall rules with a Python analyzer
- Set up a pfSense firewall in a lab (a real network gateway you own)
- Sweep your own Google Cloud project for public buckets, open firewall rules and external IPs (GCP assessment 3 of 5)
- Least privilege
- Security Information and Event Management
- Attack surface
- False positive
- Cybersecurity glossary
- Free cyber labs