Note: Cloud firewalls are part of GOLDNET Cloud, available when it opens to the public. Until then, request access and we'll set you up.
What a cloud firewall is
A cloud firewall is a set of rules that decides which traffic may reach your server. It's enforced on our side, before the traffic reaches your server, so it keeps working even if something on the server is misconfigured. You build a rule set once and attach it to as many servers as you like. Change a rule and it's applied to every server that uses that set.
How it behaves
| Situation | Incoming traffic | Outgoing traffic |
|---|---|---|
| No cloud firewall attached | Everything is allowed in | Allowed (except email on port 25, see below) |
| A cloud firewall attached | Only what your rules allow gets in; everything else is dropped | Allowed (except email on port 25) |
Your rules are "allow" rules. Anything you don't allow is blocked. IPv6 needs a few control messages to work, so those are always let through for you.
Note: Outgoing email on port 25 is closed on new servers to protect our addresses from spam. If you need it, contact support. Most apps should send mail through an authenticated mail service on port 587 anyway.
What a rule contains
- Direction: in (or out)
- Protocol: TCP, UDP, ICMP or all
- Port: a single port such as
22, or a range such as8000-8100 - Source: where the traffic may come from: anywhere, one address, or a range in CIDR form (for example your office's address with
/32on the end) - Note: a short label so you remember why the rule is there
A safe starting rule set for a web server
| Allow | Protocol | Port | From | Why |
|---|---|---|---|---|
| SSH | TCP | 22 | Your office or home address only | So only you can log in |
| Web | TCP | 80 | Anywhere | Plain web, and Let's Encrypt certificate checks |
| Secure web | TCP | 443 | Anywhere | Your website over HTTPS |
| Ping | ICMP | Anywhere | So you and your monitoring can ping the server |
With a firewall attached, ping only works if you allow ICMP, as in the last row.
Common ports
| Service | Protocol and port |
|---|---|
| SSH | TCP 22 |
| Web (HTTP / HTTPS) | TCP 80 / 443 |
| PostgreSQL | TCP 5432 |
| MySQL / MariaDB | TCP 3306 |
| Redis | TCP 6379 |
| WireGuard VPN | UDP 51820 |
Database ports should almost never be open to "anywhere". Allow them only from your app servers, ideally over a private network.
Good habits
- Lock SSH to your own address. Bots try to log in to every public server, all day.
- Use private networks between servers. They're free, never routed to the internet, and keep database traffic off the public side.
- Add a second layer on the server with
ufw(Ubuntu and Debian) orfirewalld(Rocky and AlmaLinux) if you like. The cloud firewall stops traffic before it arrives; the server's own firewall is a backstop. - Test before you close your session. After a change, open a new SSH connection first. If you lock yourself out, the browser console on the server's page still works, because it doesn't go through the firewall.
- Review rules now and then. Remove the "temporary" rule you added for a test last month.
Managed databases and load balancers come with firewalls we manage for you: you choose the trusted sources, and we keep the rules in line.
More on networking features: Cloud networking.