Use the DigitalOcean API to create, configure, list, and delete Cloud Firewalls.
Firewalls Reference
Validated on 19 Jun 2018 • Last edited on 17 Jun 2025
DigitalOcean Cloud Firewalls are a network-based, stateful firewall service for Droplets provided at no additional cost. Cloud firewalls block all traffic that isn’t expressly permitted by a rule.
The DigitalOcean API lets you manage resources programmatically with standard HTTP requests. All actions available in the control panel are also available through the API.
doctl is the command-line interface for the DigitalOcean API. It supports most of the same actions available in the API and DigitalOcean Control Panel.