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

Restrict UFW to an interface on Ubuntu—install with
apt install ufw
then allow SSH on eth0 with
ufw allow in on eth0 to any port 22
Add HTTP with
ufw allow in on eth0 to any port 80
set
ufw default deny incoming
and enable with
ufw enable
Check with
ufw status
—expect \"22/tcp (eth0) ALLOW Anywhere\" Test SSH with
ssh user@ip
—expect success only on eth0 On DigitalOcean this isolates MySQL or FTP traffic—verify interface with
ip link
(e g \"eth0: UP\") ensuring uptime by securing specific network paths without affecting others

Back to All Tips