Firewall Deep Dive — UFW & iptables for VPS
Essential rules
- Allow 80/443; restrict 22 to trusted IPs.
- Drop all else by default; log unusual packets.
- Rate limit brute-force attempts.
Service whitelisting
Open only needed ports per app; document changes and review regularly.
VIPHOSTPE