New-AzFirewallPolicyNetworkRule

Create a new Azure Firewall Policy Network Rule

Note

This is the previous version of our documentation. Please consult the most recent version for up-to-date information.

Syntax

New-AzFirewallPolicyNetworkRule
   -Name <String>
   [-Description <String>]
   -SourceAddress <String[]>
   [-SourceIpGroup <String[]>]
   -DestinationAddress <String[]>
   [-DestinationIpGroup <String[]>]
   -DestinationPort <String[]>
   [-DestinationFqdn <String[]>]
   -Protocols <String[]>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzFirewallPolicyNetworkRule cmdlet creates a Network rule for a Azure Firewall Policy.

Examples

Example 1

PS C:\> New-AzFirewallPolicyNetworkRule -Name NRC1 -Protocol "TCP" -SourceAddress "192.168.0.0/16" -DestinationAddress * -DestinationPort *

This example creates an network rule with the source address, protocol , destination address and destination port

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Description

The description of the rule

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DestinationAddress

The destination addresses of the rule

Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DestinationFqdn

The destination FQDN of the rule

Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DestinationIpGroup

The destination ipgroups of the rule

Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DestinationPort

The destination ports of the rule

Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

The name of the Network Rule

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Protocol

The protocols of the rule

Type:String[]
Accepted values:Any, TCP, UDP, ICMP
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SourceAddress

The source addresses of the rule

Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SourceIpGroup

The source ipgroups of the rule

Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

PSAzureFirewallNetworkRule