Validated on 4 Sep 2019 • Last edited on 14 Feb 2023
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.
Destroy a Firewall Using the CLI
The destroy command requires the firewall’s ID to be destroyed. To retrieve a list of firewalls and their IDs, use the doctl compute firewall list command.
How to destroy a firewall using the DigitalOcean CLI
To destroy a firewall via the command-line, follow these steps:
Use the token to grant doctl access to your
DigitalOcean account.
doctl auth init
Finally, destroy a firewall with
doctl compute firewall delete. The basic usage looks
like this, but you'll want to read the usage docs for more details:
doctl compute firewall delete <id>... [flags]
Destroy a Firewall Using the API
The destroy call requires the firewall’s ID to be destroyed. To retrieve a list of firewalls and their IDs, use the /v2/firewalls firewalls endpoint.
How to destroy a firewall using the DigitalOcean API
To destroy a firewall using the DigitalOcean API, follow these steps:
To destroy a firewall, from the Networking section of the control panel, click the Firewalls tab. Open the More menu of the firewall you want to destroy and click Destroy.
In the Destroy Firewall window that opens, click Confirm to destroy the firewall. Destroying a firewall does not destroy the Droplets that were associated with it.