Control traffic with the cloud firewall
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
- Open Firewall.
- 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 |
- 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.
- Choose Apply preset and confirm.
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
- On Firewall, choose Add a rule.
- Pick the Protocol. TCP suits most services, UDP suits things like WireGuard, and ICMP is ping.
- Enter the Port or range, like
8080or6000-6010. A range can't include port 25. - In From, list addresses or ranges such as
203.0.113.7or203.0.113.0/24. Leave it empty to allow anyone. - 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.
Still stuck? Ask us and we'll walk you through it.
