arianet firewall
این مرجع در هر نسخه به طور خودکار از راهنمای خود CLI ساخته میشود، پس همیشه با آخرین نسخه arianet یکی است. متن راهنمای هر دستور همان متن انگلیسی است که arianet <command> --help نشان میدهد. برای نصب، تنظیم توکن و شروع کار، صفحه رابط خط فرمان را ببینید.
فلگهای سراسری با همه دستورهای این صفحه کار میکنند.
arianet firewall
Manage firewalls
نحوه استفاده
arianet firewall <command>
نامهای دیگر: firewalls, fw
زیردستورها
attach: Apply a firewall to serverscreate: Create a new firewalldelete: Delete a firewalldetach: Detach a firewall from serversget: Get details and rules of a firewalllist: List your firewallsrule: Manage firewall rulesupdate: 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
فلگها
| فلگ | نوع | پیشفرض | توضیح |
|---|---|---|---|
--server | stringSlice | الزامی. 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"
فلگها
| فلگ | نوع | پیشفرض | توضیح |
|---|---|---|---|
--description | string | optional description | |
--name | string | الزامی. firewall name | |
--region | int | الزامی. 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, --yes | bool | skip 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
فلگها
| فلگ | نوع | پیشفرض | توضیح |
|---|---|---|---|
--server | stringSlice | الزامی. 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, --limit | int | 15 | results per page (max 100) |
-p, --page | int | 1 | page number |
arianet firewall rule
Manage firewall rules
نحوه استفاده
arianet firewall rule <command>
زیردستورها
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
فلگها
| فلگ | نوع | پیشفرض | توضیح |
|---|---|---|---|
--description | string | optional note shown in the rule list | |
--direction | string | ingress | traffic direction: ingress|egress |
--port | string | port or range, e.g. 443 or 8000-9000 (tcp/udp) | |
--proto | string | tcp | protocol: tcp|udp|icmp|esp|gre |
--remote-ip | string | الزامی. 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, --yes | bool | skip 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
فلگها
| فلگ | نوع | پیشفرض | توضیح |
|---|---|---|---|
--description | string | new description | |
--name | string | new name |