你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

New-AzFirewallPolicySnat

Creates SNAT configuration of PrivateRange and AutoLearnPrivateRanges for the firewall policy

Syntax

New-AzFirewallPolicySnat
   [-PrivateRange <String[]>]
   [-AutoLearnPrivateRange]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The New-AzFirewallPolicySnat is used to configure Private Ranges and auto learn private ranges for a firewall policy.

Examples

Example 1

New-AzFirewallPolicySnat -PrivateRange @("3.3.0.0/24", "98.0.0.0/8","10.227.16.0/20") -AutoLearnPrivateRange

PrivateRange	            : ["3.3.0.0/24", "98.0.0.0/8","10.227.16.0/20"]	
		AutoLearnPrivateRanges	    : Enabled

This example configures private IP addresses/IP ranges to which traffic will not be SNATed and enables auto learn of private ip ranges in Firewall Policy.

Example 2

New-AzFirewallPolicySnat -PrivateRange @("3.3.0.0/24", "98.0.0.0/8","10.227.16.0/20")

PrivateRange	            : ["3.3.0.0/24", "98.0.0.0/8","10.227.16.0/20"]	
	 AutoLearnPrivateRanges	    : Disabled

This example configures private IP addresses/IP ranges to which traffic will not be SNATed and disables auto learn of private ip ranges in Firewall Policy.

Parameters

-AutoLearnPrivateRange

Enable/disable auto learn private ranges. By default it is disabled.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PrivateRange

The Private IP Range

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

Inputs

None

Outputs

PSAzureFirewallPolicySNAT