Control traffic with the cloud firewall

cloud, vps, firewall, ports, ssh, security · 0 found this helpful

The cloud firewall decides which traffic from the internet can reach your server. Anything without a rule is blocked. Start from a preset, then add rules for anything else your server needs.

Choose a preset

  1. Open Firewall.
  2. Under Start from a preset, choose one:
Preset What it allows
Web server SSH from your addresses, web (80, 443) from anywhere
SSH only SSH from your addresses, nothing else
Web app SSH from your addresses, web and port 3000 from anywhere
  1. In Allow SSH from, list the addresses you connect from, one per line. Choose Add my address to add the one you're using now. Leave it empty to allow SSH from anywhere, and the panel reminds you that SSH is then open to everyone.
  2. Choose Apply preset and confirm.
Firewall presets with the Allow SSH from box

Applying a preset replaces all your rules. Every preset allows ping, so monitoring keeps working.

Limiting SSH to your own addresses stops most break-in attempts. If your home or office address changes, update the list or you'll be locked out. The console still works when that happens. See Use the console and SSH.

Add a rule

  1. On Firewall, choose Add a rule.
  2. Pick the Protocol. TCP suits most services, UDP suits things like WireGuard, and ICMP is ping.
  3. Enter the Port or range, like 8080 or 6000-6010. A range can't include port 25.
  4. In From, list addresses or ranges such as 203.0.113.7 or 203.0.113.0/24. Leave it empty to allow anyone.
  5. Choose Add rule.

This example lets only your office reach a PostgreSQL server:

Protocol Port or range From
TCP 5432 203.0.113.7

To remove a rule, choose Remove beside it. The panel warns you when removing a rule would close SSH.

Outgoing email

Port 25 is closed for outgoing mail on new servers, to protect everyone's mail delivery. Send mail through an email service on port 587 instead, or see Send email from a cloud server.

If something goes wrong

  • A site stopped loading after you changed rules. Check that Incoming rules has TCP 80 and 443 from anywhere.
  • The panel says an entry isn't an address or range. Use numbers, not domain names, and a range like /24, not /33.
  • You locked yourself out of SSH. Choose Open the console on Server, or apply the Web server preset with your current address.

Was this helpful?

Still stuck? Ask us and we'll walk you through it.