Firewall
Problem
A server is reachable through a network.
That doesn't mean every machine should be allowed to connect to every port.
Solution — Firewall
A firewall evaluates traffic against rules.
It can filter both inbound (incoming) and outbound (outgoing) traffic.
Internet → HTTPS 443 → allow Internet → SQL 1433 → deny AdminNet → SSH 22 → allow
Core idea: firewalls control which network traffic may cross a boundary.