Ubuntu UFW Firewall Setup and Basic Rules
UFW is Ubuntu's user-friendly interface for host firewall rules. Allow SSH before enabling it on a remote server.
Basic setup
sudo ufw allow OpenSSH\nsudo ufw allow 80/tcp\nsudo ufw allow 443/tcp\nsudo ufw enable\nsudo ufw status numberedRestrict management access
When you have a stable management IP, limit SSH to that address. Keep the current session open while testing.
Maintain rules
Review numbered rules, remove obsolete entries and enable logging when needed. A firewall complements updates, strong authentication and monitoring.
Was this helpful?
Thanks for your feedback!
