Edit

Share via


New-AzFirewallPolicyNatRuleCollection

Create a new Azure Firewall Policy Nat Rule Collection

Syntax

Default (Default)

New-AzFirewallPolicyNatRuleCollection
    -Name <String>
    -Priority <UInt32>
    [-Rule <PSAzureFirewallPolicyNatRule[]>]
    -ActionType <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The New-AzFirewallPolicyNatRuleCollection cmdlet creates a Nat rule collection for a Azure Firewall Policy.

Examples

Example 1

$netRule1 = New-AzFirewallPolicyNatRule -Name NatRule1 -Protocol "TCP" -SourceAddress "192.168.0.0/16" -DestinationAddress 10.20.30.40 -DestinationPort 1000 -TranslatedAddress "192.168.0.1" -TranslatedPort "100"
New-AzFirewallPolicyNatRuleCollection -Name NatRC1 -Priority 200 -Rule $netRule1 -ActionType "Dnat"

This example creates a nat rule collection with a network rule

Parameters

-ActionType

The type of the rule action

Parameter properties

Type:String
Default value:None
Accepted values:Dnat, Snat
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

-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

-Name

The name of the Network Rule Collection

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

-Priority

The priority of the rule collection

Parameter properties

Type:UInt32
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

-Rule

The list of network rules

Parameter properties

Type:

PSAzureFirewallPolicyNatRule[]

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

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

PSAzureFirewallNetworkRuleCollection