Control Network Traffic
A firewall is a security system that monitors and controls incoming and outgoing network traffic.
Network Firewall → Protects entire network Host Firewall → Protects single system Cloud Firewall → Used in AWS/GCP
Allow → Permit traffic Deny → Block traffic Port-based filtering IP-based filtering
Allow 80 → Website Allow 443 → HTTPS Block others
sudo ufw enable sudo ufw allow 22 sudo ufw allow 80 sudo ufw status
- Prevent unauthorized access - Protect servers - Control traffic