az network firewall policy rule-collection-group collection rule

Note

This reference is part of the azure-firewall extension for the Azure CLI (version 2.15.0 or higher). The extension will automatically install the first time you run an az network firewall policy rule-collection-group collection rule command. Learn more about extensions.

Manage and configure the rule of a filter collection in the rule collection group of Azure firewall policy.

Filter collection supports having a list of network rules or application rules. NatRule collection supports including a list of nat rules.

Commands

az network firewall policy rule-collection-group collection rule add

Add a rule into an Azure firewall policy rule collection.

az network firewall policy rule-collection-group collection rule remove

Remove a rule from an Azure firewall policy rule collection.

az network firewall policy rule-collection-group collection rule update

Update a rule of an Azure firewall policy rule collection.

az network firewall policy rule-collection-group collection rule add

Add a rule into an Azure firewall policy rule collection.

Filter collection supports having a list of network rules or application rules. NatRule collection supports including a list of nat rules.

az network firewall policy rule-collection-group collection rule add --collection-name
                                                                     --name
                                                                     --policy-name
                                                                     --rcg-name
                                                                     --resource-group
                                                                     --rule-type {ApplicationRule, NatRule, NetworkRule}
                                                                     [--description]
                                                                     [--dest-addr]
                                                                     [--dest-ipg]
                                                                     [--destination-fqdns]
                                                                     [--destination-ports]
                                                                     [--enable-tls-insp {false, true}]
                                                                     [--fqdn-tags]
                                                                     [--ip-protocols {Any, ICMP, TCP, UDP}]
                                                                     [--protocols]
                                                                     [--source-addresses]
                                                                     [--source-ip-groups]
                                                                     [--target-fqdns]
                                                                     [--target-urls]
                                                                     [--translated-address]
                                                                     [--translated-fqdn]
                                                                     [--translated-port]
                                                                     [--web-categories]

Required Parameters

--collection-name

The name of the rule collection in Firewall Policy Rule Collection Group.

--name -n

The name of rule.

--policy-name

The name of the Firewall Policy.

--rcg-name --rule-collection-group-name

The name of the Firewall Policy Rule Collection Group.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--rule-type

The type of rule.

accepted values: ApplicationRule, NatRule, NetworkRule

Optional Parameters

--description

The description of rule.

--dest-addr --destination-addresses

Space-separated list of destination IP addresses.

--dest-ipg --destination-ip-groups

Space-separated list of name or resource id of destination IpGroups.

--destination-fqdns

Space-separated list of destination FQDNs.

--destination-ports

Space-separated list of destination ports. This argument is supported for Nat and Network Rule.

--enable-tls-insp --enable-tls-inspection

Enable flag to terminate TLS connection for this rule.

accepted values: false, true
--fqdn-tags

Space-separated list of FQDN tags for this rule.

--ip-protocols

Space-separated list of IP protocols. This argument is supported for Nat and Network Rule.

accepted values: Any, ICMP, TCP, UDP
--protocols

Space-separated list of protocols and port numbers to use, in PROTOCOL=PORT format. Valid protocols are Http, Https.

--source-addresses

Space-separated list of source IP addresses.

--source-ip-groups

Space-separated list of name or resource id of source IpGroups.

--target-fqdns

Space-separated list of FQDNs for this rule.

--target-urls

Space-separated list of target urls for this rule.

--translated-address

Translated address for this NAT rule collection.

--translated-fqdn

Translated FQDN for this NAT rule collection.

--translated-port

Translated port for this NAT rule collection.

--web-categories

Space-separated list of web categories for this rule.

az network firewall policy rule-collection-group collection rule remove

Remove a rule from an Azure firewall policy rule collection.

Filter collection supports having a list of network rules or application rules. NatRule collection supports including a list of nat rules.

az network firewall policy rule-collection-group collection rule remove --collection-name
                                                                        --name
                                                                        --policy-name
                                                                        --rcg-name
                                                                        --resource-group

Required Parameters

--collection-name

The name of the rule collection in Firewall Policy Rule Collection Group.

--name -n

The name of rule.

--policy-name

The name of the Firewall Policy.

--rcg-name --rule-collection-group-name

The name of the Firewall Policy Rule Collection Group.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az network firewall policy rule-collection-group collection rule update

Update a rule of an Azure firewall policy rule collection.

Filter collection supports having a list of network rules or application rules. NatRule collection supports including a list of nat rules.

az network firewall policy rule-collection-group collection rule update --collection-name
                                                                        --name
                                                                        --policy-name
                                                                        --rcg-name
                                                                        --resource-group
                                                                        [--add]
                                                                        [--description]
                                                                        [--dest-addr]
                                                                        [--dest-ipg]
                                                                        [--destination-fqdns]
                                                                        [--destination-ports]
                                                                        [--enable-tls-insp {false, true}]
                                                                        [--force-string]
                                                                        [--fqdn-tags]
                                                                        [--ip-protocols {Any, ICMP, TCP, UDP}]
                                                                        [--protocols]
                                                                        [--remove]
                                                                        [--set]
                                                                        [--source-addresses]
                                                                        [--source-ip-groups]
                                                                        [--target-fqdns]
                                                                        [--target-urls]
                                                                        [--translated-address]
                                                                        [--translated-fqdn]
                                                                        [--translated-port]
                                                                        [--web-categories]

Examples

Update a rule of an Azure firewall policy rule collection.

az network firewall policy rule-collection-group collection rule update -g {rg} --policy-name {policy} --rule-collection-group-name {rcg} --collection-name {cn} -n {rule_name} --target-fqdns XXX

Required Parameters

--collection-name

The name of the rule collection in Firewall Policy Rule Collection Group.

--name -n

The name of rule.

--policy-name

The name of the Firewall Policy.

--rcg-name --rule-collection-group-name

The name of the Firewall Policy Rule Collection Group.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--description

The description of rule.

--dest-addr --destination-addresses

Space-separated list of destination IP addresses.

--dest-ipg --destination-ip-groups

Space-separated list of name or resource id of destination IpGroups.

--destination-fqdns

Space-separated list of destination FQDNs.

--destination-ports

Space-separated list of destination ports. This argument is supported for Nat and Network Rule.

--enable-tls-insp --enable-tls-inspection

Enable flag to terminate TLS connection for this rule.

accepted values: false, true
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

--fqdn-tags

Space-separated list of FQDN tags for this rule.

--ip-protocols

Space-separated list of IP protocols. This argument is supported for Nat and Network Rule.

accepted values: Any, ICMP, TCP, UDP
--protocols

Space-separated list of protocols and port numbers to use, in PROTOCOL=PORT format. Valid protocols are Http, Https.

--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--source-addresses

Space-separated list of source IP addresses.

--source-ip-groups

Space-separated list of name or resource id of source IpGroups.

--target-fqdns

Space-separated list of FQDNs for this rule.

--target-urls

Space-separated list of target urls for this rule.

--translated-address

Translated address for this NAT rule collection.

--translated-fqdn

Translated FQDN for this NAT rule collection.

--translated-port

Translated port for this NAT rule collection.

--web-categories

Space-separated list of web categories for this rule.