Security

Configure a firewall with UFW

Allow only the ports you need on Ubuntu and Debian. · 3 min read

apt -y install ufw
ufw default deny incoming
ufw default allow outgoing
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
ufw status verbose

Allow SSH only from your office IP:

ufw delete allow OpenSSH
ufw allow from 203.0.113.10 to any port 22 proto tcp

If you lock yourself out, use the VNC console in the client area and run ufw disable.

Order a server built by real engineers or talk to our team — we are online 24/7. Support →

Security

All tutorials

Ready to launch your project?

Order a server built by real engineers or talk to our team — we are online 24/7.