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

Secure SSH with UFW on an Ubuntu VPS—install UFW with
apt update && apt install ufw
then allow SSH with
ufw allow 22/tcp
(or custom port e g ufw allow 2222/tcp) Set a default deny policy with
ufw default deny incoming
and
ufw default allow outgoing
then enable with
ufw enable
—confirm \"y\" to activate Verify rules with
ufw status numbered
expecting \"22/tcp ALLOW Anywhere\" Add logging with
ufw logging on
—check /var/log/ufw log for blocks On Linode this ensures only SSH traffic passes protecting MySQL and phpMyAdmin while maintaining uptime—test with
ssh user@ip
to confirm access

Back to All Tips