Advanced Topic 40 of 50 Computer Networks
Firewalls
Filters permitting or blocking traffic by rules.
How it works
A firewall filters network traffic according to rules, allowing or blocking packets based on source and destination addresses, ports, protocols and connection state. Stateful firewalls track connections and allow replies automatically, while next-generation firewalls inspect applications, users and content, and web application firewalls understand HTTP attacks. Rules are evaluated in order, usually with a default deny policy.
Step-by-step walkthrough
- A packet arrives at the firewall.
- It is compared with rules from top to bottom.
- The first match decides, so allow 443 lets HTTPS pass.
- Anything unmatched falls to default deny.
- Stateful firewalls also remember which connections are established.
Where it is used
Network perimeters, host-based firewalls such as iptables, nftables and Windows Defender Firewall, cloud security groups and Kubernetes network policies protect systems from unwanted access.
Common pitfall
Overly permissive rules, such as any-any, or forgotten legacy rules create exposure, while rules that are too strict break applications. Rule order mistakes silently change behavior. A firewall does not stop attacks that arrive over allowed ports or through compromised internal hosts. Review rules regularly, log denied traffic and apply least privilege.
Where it fits in the course
Firewalls is topic 40 of 50 in Computer Networks, rated Advanced. It follows Proxies. The next topic is VPN.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Computer Networks quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Computer Networks quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Firewalls?
Where do people use Firewalls?
What is the most common mistake with Firewalls?
What should I learn before this topic?
How can I practice it?
Is Firewalls hard to learn?
How long does it take to learn Firewalls?
Which topics are related to Firewalls?
What should I study after Firewalls?
Related topics
- Proxies (Computer Networks)
- VPN (Computer Networks)
- Load Balancers (Computer Networks)
- QUIC and HTTP/3 (Computer Networks)