پرش به مطلب اصلی

arianet firewall

این مرجع در هر نسخه به طور خودکار از راهنمای خود CLI ساخته می‌شود، پس همیشه با آخرین نسخه arianet یکی است. متن راهنمای هر دستور همان متن انگلیسی است که arianet <command> --help نشان می‌دهد. برای نصب، تنظیم توکن و شروع کار، صفحه رابط خط فرمان را ببینید.

فلگ‌های سراسری با همه دستورهای این صفحه کار می‌کنند.

arianet firewall​

Manage firewalls

نحوه استفاده

arianet firewall <command>

نام‌های دیگر: firewalls, fw

زیردستورها

  • 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

نحوه استفاده

arianet firewall attach <firewall-id> [flags]

مثال‌ها

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

فلگ‌ها

فلگنوعپیش‌فرضتوضیح
--serverstringSliceالزامی. 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".

نحوه استفاده

arianet firewall create [flags]

مثال‌ها

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

فلگ‌ها

فلگنوعپیش‌فرضتوضیح
--descriptionstringoptional description
--namestringالزامی. firewall name
--regionintالزامی. region ID (see: arianet region list)

arianet firewall delete​

Delete a firewall

نحوه استفاده

arianet firewall delete <id> [flags]

مثال‌ها

arianet firewall delete 7
arianet firewall delete 7 --yes

فلگ‌ها

فلگنوعپیش‌فرضتوضیح
-y, --yesboolskip confirmation prompt

arianet firewall detach​

Detach a firewall from servers

نحوه استفاده

arianet firewall detach <firewall-id> [flags]

مثال‌ها

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

فلگ‌ها

فلگنوعپیش‌فرضتوضیح
--serverstringSliceالزامی. server ID (repeat or comma-separate for several)

arianet firewall get​

Get details and rules of a firewall

نحوه استفاده

arianet firewall get <id> [flags]

مثال‌ها

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

arianet firewall list​

List your firewalls

نحوه استفاده

arianet firewall list [flags]

مثال‌ها

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

فلگ‌ها

فلگنوعپیش‌فرضتوضیح
-l, --limitint15results per page (max 100)
-p, --pageint1page number

arianet firewall rule​

Manage firewall rules

نحوه استفاده

arianet firewall rule <command>

زیردستورها

  • 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.

نحوه استفاده

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

مثال‌ها

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

فلگ‌ها

فلگنوعپیش‌فرضتوضیح
--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-ipstringالزامی. 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>".

نحوه استفاده

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

مثال‌ها

arianet firewall get 7
arianet firewall rule remove 7 3f9c2a1e

فلگ‌ها

فلگنوعپیش‌فرضتوضیح
-y, --yesboolskip confirmation prompt

arianet firewall update​

Rename a firewall or change its description

نحوه استفاده

arianet firewall update <id> [flags]

مثال‌ها

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

فلگ‌ها

فلگنوعپیش‌فرضتوضیح
--descriptionstringnew description
--namestringnew name