Web Hosting & VPS Tips

Unleash Your Server Potential with Expert Insights

Hosting provided by: Cloudways
Free to Try! Up to 40% Off!

Category: VPS Setup

Set up UFW (Uncomplicated Firewall) on Ubuntu VPS for quick security—run
apt update && apt install ufw
to install then
ufw allow 22
to open SSH and
ufw enable
to activate UFW simplifies firewall management compared to iptables ideal for protecting MySQL (port 3306) or FTP (port 21) Add rules like
ufw allow 80
for HTTP and
ufw status
to verify—expect \"22/tcp ALLOW Anywhere\" Enable logging with
ufw logging on
to track blocked attempts in /var/log/ufw log Its default deny policy ensures only specified ports are open securing your VPS with minimal CLI effort

Back to All Tips