Edit

Share via


New-AzFirewallPolicyNetworkRule

Create a new Azure Firewall Policy Network Rule

Syntax

SourceAddress

New-AzFirewallPolicyNetworkRule
    -Name <String>
    -SourceAddress <String[]>
    -DestinationPort <String[]>
    -Protocol <String[]>
    [-Description <String>]
    [-DestinationAddress <String[]>]
    [-DestinationIpGroup <String[]>]
    [-DestinationFqdn <String[]>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

SourceIpGroup

New-AzFirewallPolicyNetworkRule
    -Name <String>
    -SourceIpGroup <String[]>
    -DestinationPort <String[]>
    -Protocol <String[]>
    [-Description <String>]
    [-DestinationAddress <String[]>]
    [-DestinationIpGroup <String[]>]
    [-DestinationFqdn <String[]>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

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

Examples

Example 1

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

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Description

The description of the rule

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DestinationAddress

The destination addresses of the rule

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DestinationFqdn

The destination FQDN of the rule

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DestinationIpGroup

The destination ipgroups of the rule

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DestinationPort

The destination ports of the rule

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

The name of the Network Rule

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Protocol

The protocols of the rule

Parameter properties

Type:

String[]

Default value:None
Accepted values:Any, TCP, UDP, ICMP
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SourceAddress

The source addresses of the rule

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SourceAddress
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SourceIpGroup

The source ipgroups of the rule

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SourceIpGroup
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

PSAzureFirewallNetworkRule