Skip to main content

arianet firewall

This reference is generated from the CLI's own help on every release, so it always matches the latest arianet. The command help is the same text arianet <command> --help prints. For installation, configuration and a guided start, see the CLI page.

The global flags work with every command on this page.

arianet firewall​

Manage firewalls

Usage

arianet firewall <command>

Aliases: firewalls, fw

Subcommands

  • attach: Apply a firewall to servers
  • create: Create a new firewall
  • delete: Delete a firewall
  • detach: Detach a firewall from servers
  • get: Get details and rules of a firewall
  • list: List your firewalls
  • rule: Manage firewall rules
  • update: Rename a firewall or change its description

arianet firewall attach​

Apply a firewall to servers

Usage

arianet firewall attach <firewall-id> [flags]

Examples

arianet firewall attach 7 --server 42
arianet firewall attach 7 --server 42,43,44

Flags

FlagTypeDefaultDescription
--serverstringSlicerequired. server ID (repeat or comma-separate for several)

arianet firewall create​

Create a new firewall

Create a new firewall in a region.

The firewall starts without rules; add them with "arianet firewall rule add" and apply it to servers with "arianet firewall attach".

Usage

arianet firewall create [flags]

Examples

arianet firewall create --name web-fw --region 1
arianet firewall create --name web-fw --region 1 --description "public web servers"

Flags

FlagTypeDefaultDescription
--descriptionstringoptional description
--namestringrequired. firewall name
--regionintrequired. region ID (see: arianet region list)

arianet firewall delete​

Delete a firewall

Usage

arianet firewall delete <id> [flags]

Examples

arianet firewall delete 7
arianet firewall delete 7 --yes

Flags

FlagTypeDefaultDescription
-y, --yesboolskip confirmation prompt

arianet firewall detach​

Detach a firewall from servers

Usage

arianet firewall detach <firewall-id> [flags]

Examples

arianet firewall detach 7 --server 42
arianet firewall detach 7 --server 42,43,44

Flags

FlagTypeDefaultDescription
--serverstringSlicerequired. server ID (repeat or comma-separate for several)

arianet firewall get​

Get details and rules of a firewall

Usage

arianet firewall get <id> [flags]

Examples

arianet firewall get 7
arianet firewall get 7 --output json

arianet firewall list​

List your firewalls

Usage

arianet firewall list [flags]

Examples

arianet firewall list
arianet firewall list --page 2 --limit 20
arianet firewall list --output json

Flags

FlagTypeDefaultDescription
-l, --limitint15results per page (max 100)
-p, --pageint1page number

arianet firewall rule​

Manage firewall rules

Usage

arianet firewall rule <command>

Subcommands

  • add: Add a rule to a firewall
  • remove: Remove a rule from a firewall

arianet firewall rule add​

Add a rule to a firewall

Add a rule to a firewall.

--remote-ip is the allowed source for ingress rules and the allowed destination for egress rules. It is required on purpose: pass 0.0.0.0/0 to allow everyone.

Usage

arianet firewall rule add <firewall-id> [flags]

Examples

arianet firewall rule add 7 --direction ingress --proto tcp --port 443 --remote-ip 0.0.0.0/0
arianet firewall rule add 7 --direction ingress --proto tcp --port 22 --remote-ip 203.0.113.7/32 --description "office"
arianet firewall rule add 7 --direction ingress --proto icmp --remote-ip 0.0.0.0/0
arianet firewall rule add 7 --direction egress --proto tcp --port 8000-9000 --remote-ip 10.0.0.0/8

Flags

FlagTypeDefaultDescription
--descriptionstringoptional note shown in the rule list
--directionstringingresstraffic direction: ingress|egress
--portstringport or range, e.g. 443 or 8000-9000 (tcp/udp)
--protostringtcpprotocol: tcp|udp|icmp|esp|gre
--remote-ipstringrequired. source (ingress) or destination (egress) CIDR, e.g. 203.0.113.7/32

arianet firewall rule remove​

Remove a rule from a firewall

Remove a rule from a firewall.

The rule ID is the string shown in the "Rule ID" column of "arianet firewall get <firewall-id>".

Usage

arianet firewall rule remove <firewall-id> <rule-id> [flags]

Examples

arianet firewall get 7
arianet firewall rule remove 7 3f9c2a1e

Flags

FlagTypeDefaultDescription
-y, --yesboolskip confirmation prompt

arianet firewall update​

Rename a firewall or change its description

Usage

arianet firewall update <id> [flags]

Examples

arianet firewall update 7 --name web-fw-2

Flags

FlagTypeDefaultDescription
--descriptionstringnew description
--namestringnew name