Ports and the firewall
The public firewall sits outside the machine and is managed from the console.
Public ports
Click “Ports” on the machine's card. The ports in the list are open to everyone and every other port is closed; saving replaces the whole list.
| Open by default | For |
|---|---|
| 22 | SSH |
| 80, 443 | Websites |
Take 22 out of the list and you can no longer SSH in.
Do not open a port for something only the machine itself uses, such as a database; have it listen on 127.0.0.1.
Kept apart from other customers
Every machine carries a built-in rule that refuses connections from the cloud's private network: other customers' machines in the same region cannot reach your private address, including ports your containers publish. It does not affect access from the internet or your own Docker networks.
Letting an agent change them
The endpoint is in the API reference.