az network firewall nat-rule

注意

此參考是 Azure CLI 的 azure 防火牆延伸模組的一部分(2.55.0 版或更高版本)。 擴充功能會在您第一次執行 az network firewall nat-rule 命令時自動安裝。 深入了解擴充功能。

管理及設定 Azure 防火牆 NAT 規則。

命令

名稱 Description 類型 狀態
az network firewall nat-rule collection

管理及設定 Azure 防火牆 NAT 規則。

副檔名 GA
az network firewall nat-rule collection delete

刪除 Azure 防火牆 NAT 規則集合。

副檔名 GA
az network firewall nat-rule collection list

列出 #D5891F40FB9CA4FD2B55C00D2F76D707F NAT 規則集合。

副檔名 GA
az network firewall nat-rule collection show

取得 Azure 防火牆 NAT 規則集合的詳細數據。

副檔名 GA
az network firewall nat-rule create

建立 Azure 防火牆 NAT 規則。

副檔名 GA
az network firewall nat-rule delete

刪除 Azure 防火牆 NAT 規則。

副檔名 GA
az network firewall nat-rule list

列出 Azure 防火牆 NAT 規則。

副檔名 GA
az network firewall nat-rule show

取得 Azure 防火牆 NAT 規則的詳細數據。

副檔名 GA

az network firewall nat-rule create

建立 Azure 防火牆 NAT 規則。

az network firewall nat-rule create --collection-name
                                    --dest-addr
                                    --destination-ports
                                    --firewall-name
                                    --name
                                    --protocols {Any, ICMP, TCP, UDP}
                                    --resource-group
                                    --translated-port
                                    [--action {Dnat, Snat}]
                                    [--description]
                                    [--priority]
                                    [--source-addresses]
                                    [--source-ip-groups]
                                    [--translated-address]
                                    [--translated-fqdn]

必要參數

--collection-name -c

要用來建立規則的集合名稱。 如果集合不存在,將會建立集合。

--dest-addr --destination-addresses

目的地IP位址的空間分隔清單。 使用 『*』 來比對全部。

--destination-ports

目的地埠的空間分隔清單。 使用 『*』 來比對全部。

--firewall-name -f

Azure 防火牆 名稱。

--name -n

NAT 規則的名稱。

--protocols

以空格分隔的通訊協議清單。

接受的值: Any, ICMP, TCP, UDP
--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--translated-port

此 NAT 規則的轉譯埠。

選擇性參數

--action

要套用至規則集合的動作。 只有在您要建立集合時,才提供 。

接受的值: Dnat, Snat
--description

規則描述。

--priority

規則集合的優先順序從 100 (高) 到 65000 (低)。 只有在您要建立集合時,才提供 。

--source-addresses

來源IP位址的空間分隔清單。 使用 『*』 來比對全部。

--source-ip-groups

以空格分隔的來源 IpGroups 名稱或資源識別碼清單。

--translated-address

此 NAT 規則的翻譯位址。

--translated-fqdn

此 NAT 規則的已翻譯 FQDN。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az network firewall nat-rule delete

刪除 Azure 防火牆 NAT 規則。

az network firewall nat-rule delete [--collection-name]
                                    [--firewall-name]
                                    [--ids]
                                    [--name]
                                    [--resource-group]
                                    [--subscription]

選擇性參數

--collection-name -c

規則集合的名稱。

--firewall-name -f

Azure 防火牆 名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--name -n

NAT 規則的名稱。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az network firewall nat-rule list

列出 Azure 防火牆 NAT 規則。

az network firewall nat-rule list --collection-name
                                  --firewall-name
                                  --resource-group

必要參數

--collection-name -c

規則集合的名稱。

--firewall-name -f

Azure 防火牆 名稱。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az network firewall nat-rule show

取得 Azure 防火牆 NAT 規則的詳細數據。

az network firewall nat-rule show [--collection-name]
                                  [--firewall-name]
                                  [--ids]
                                  [--name]
                                  [--resource-group]
                                  [--subscription]

選擇性參數

--collection-name -c

規則集合的名稱。

--firewall-name -f

Azure 防火牆 名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--name -n

NAT 規則的名稱。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。