Firewall
In plain terms
A barrier that filters network traffic based on security rules.
Going deeper
A firewall inspects incoming and outgoing packets and allows or blocks them by rules (ports, addresses, protocols). It's a first line of defense controlling what can reach a network or host.
Under the hood
Stateful firewalls track connection state; next-gen and web application firewalls (WAF) inspect application-layer traffic for attacks like SQLi and XSS.
Examples
iptables, AWS Security Groups, Cloudflare WAF, network ACLs, port filtering.
Think of it like...
Like a club's door policy: a list decides who gets in and who's turned away before they ever reach the dance floor.