> > reference > compute > firewall

doctl compute firewall

Go to Navigation

Usage

doctl compute firewall [flags]

Description

The sub-commands of doctl compute firewall manage DigitalOcean cloud firewalls.

Cloud firewalls provide the ability to restrict network access to and from a Droplet, allowing you to define which ports accept inbound or outbound connections. With these commands, you can list, create, or delete Cloud firewalls, as well as modify access rules.

A firewall's inbound_rules and outbound_rules attributes contain arrays of objects as their values. These objects contain the standard attributes of their associated types, which can be found below.

Inbound access rules specify the protocol (TCP, UDP, or ICMP), ports, and sources for inbound traffic that will be allowed through the Firewall to the target Droplets. The ports attribute may contain a single port, a range of ports (e.g. 8000-9000), or all to allow traffic on all ports for the specified protocol. The sources attribute will contain an object specifying a whitelist of sources from which traffic will be accepted.

Flags

OptionDescription
--help, -hHelp for this command
CommandDescription
doctl computeDisplay commands that manage infrastructure
doctl compute firewall add-dropletsAdd Droplets to a cloud firewall
doctl compute firewall add-rulesAdd inbound or outbound rules to a cloud firewall
doctl compute firewall add-tagsAdd tags to a cloud firewall
doctl compute firewall createCreate a new cloud firewall
doctl compute firewall deletePermanently delete a cloud firewall
doctl compute firewall getRetrieve information about a cloud firewall
doctl compute firewall listList the cloud firewalls on your account
doctl compute firewall list-by-dropletList firewalls by Droplet
doctl compute firewall remove-dropletsRemove Droplets from a cloud firewall
doctl compute firewall remove-rulesRemove inbound or outbound rules from a cloud firewall
doctl compute firewall remove-tagsRemove tags from a cloud firewall
doctl compute firewall updateUpdate a cloud firewall's configuration

Global Flags

OptionDescription
--access-token, -tAPI V2 access token
--api-url, -uOverride default API endpoint
--config, -cSpecify a custom config file
Default:
  • macOS: ${HOME}/Library/Application Support/doctl/config.yaml
  • Linux: ${XDG_CONFIG_HOME}/doctl/config.yaml
  • Windows: %APPDATA%\doctl\config.yaml
--contextSpecify a custom authentication context name
--output, -oDesired output format [text|json]
Default: text
--traceShow a log of network activity while performing a command
Default: false
--verbose, -vEnable verbose output
Default: false