Skip to content
PK Hosting
VPS & servers

Harden the firewall on a VPS

Lock SSH and application ports on Cloud or Premium VPS before you expose the server to the internet.

Last updated

A VPS is self-managed. We provision the machine and network; you control the host firewall.

  1. Prefer ufw on Ubuntu/Debian or firewalld on Rocky Linux.
  2. Allow SSH (your configured port) from your office or VPN IP first, then enable the firewall.
  3. Open only the ports your application needs β€” typically 80 and 443 for websites, 3389 only if you use Windows RDP, and never a database port on a public interface.
  4. Test a second SSH session before you disconnect the first one.

If you lock yourself out, open a dashboard ticket. We can help from the provider console; that is not an instant self-serve reset.

Network-level DDoS filtering on the uplink is not a substitute for a host firewall.

Still need a hand?

Open a ticket from your dashboard with your domain and a screenshot β€” our team replies fast.