The VPS firewall

Opening ports without locking yourself out.

The firewall sits in front of your VPS, outside the system, and filters what comes in. What your server sends out is not touched.

Turn it on

On the Firewall page, press Turn on. If no rule lets SSH in, a rule for port 22 is added first, so you are not locked out.

Let something in

Start from a preset: SSH, Websites (80 and 443), Mail server (25, 465, 587 and 993), Ping or WireGuard (UDP 51820). Or make your own under Allow something in:

  • What: TCP, UDP or Ping.
  • Port: one, such as 443, a list, such as 80,443, or a range, such as 8000:8100.
  • From: empty for anywhere, or one address or network, such as your own.

You can have up to 30 rules. Anything no rule lets in is turned away.

Mail out on port 25

Sending mail straight out on port 25 is closed on every VPS, so one sender cannot put our addresses on the spam lists for everyone. That block sits outside your server and outside this firewall, so no rule here opens it. Mail coming in on port 25 works, and so does sending through a mail service on port 587 or 465.

Locked out?

Console on the server's page does not go through the firewall, so you can always get in and fix things.

A firewall inside the system, such as ufw or firewalld, works as well. A port then has to be open in both.