Report this

What is the reason for this report?

Digital Ocean Cloud Firewall?

Posted on April 1, 2026

How to set up a Digital Ocean Cloud firewall



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

Setting up a DigitalOcean Cloud Firewall is pretty straightforward and doesn’t require installing anything on your Droplet.

At a high level, you can do it directly from the control panel:

  1. Go to Networking → Firewalls

  2. Click Create Firewall

  3. Give it a name

  4. Add your inbound rules (for example: SSH on port 22, HTTP 80, HTTPS 443)

  5. Add outbound rules (usually allow all by default)

  6. Attach it to your Droplet (or use tags)

Once applied, the firewall will block all traffic that isn’t explicitly allowed by your rules:

https://docs.digitalocean.com/products/networking/firewalls/

A couple of quick tips:

  • Start with allowing SSH (port 22), otherwise you might lock yourself out

  • Only open the ports you actually need

  • You can restrict access by IP instead of allowing everything

Overall, it’s one of the easier cloud firewalls to set up, and it’s free to use with your Droplets.

Heya, @robert3e3ae0804c1e4a1caf6eecd4

You can check the following articles here:

  1. How to Configure Firewall Rules
  2. How to Create Firewalls

Regards

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.