New-AzureRmLoadBalancerInboundNatRuleConfig

Creates an inbound NAT rule configuration for a load balancer.

Syntax

New-AzureRmLoadBalancerInboundNatRuleConfig
   -Name <String>
   [-Protocol <String>]
   [-FrontendPort <Int32>]
   [-BackendPort <Int32>]
   [-IdleTimeoutInMinutes <Int32>]
   [-EnableFloatingIP]
   [-EnableTcpReset]
   [-FrontendIpConfiguration <PSFrontendIPConfiguration>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzureRmLoadBalancerInboundNatRuleConfig
   -Name <String>
   [-Protocol <String>]
   [-FrontendPort <Int32>]
   [-BackendPort <Int32>]
   [-IdleTimeoutInMinutes <Int32>]
   [-EnableFloatingIP]
   [-EnableTcpReset]
   [-FrontendIpConfigurationId <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzureRmLoadBalancerInboundNatRuleConfig cmdlet creates an inbound network address translation (NAT) rule configuration for an Azure load balancer.

Examples

Example 1: Create an inbound NAT rule configuration for a load balancer

PS C:\>$publicip = New-AzureRmPublicIpAddress -ResourceGroupName "MyResourceGroup" -Name "MyPublicIP" -Location "West US" -AllocationMethod "Dynamic"
PS C:\> $frontend = New-AzureRmLoadBalancerFrontendIpConfig -Name "FrontendIpConfig01" -PublicIpAddress $publicip
PS C:\> New-AzureRmLoadBalancerInboundNatRuleConfig -Name "MyInboundNatRule" -FrontendIPConfiguration $frontend -Protocol "Tcp" -FrontendPort 3389 -BackendPort 3389

The first command creates a public IP address named MyPublicIP in the resource group named MyResourceGroup, and then stores it in the $publicip variable. The second command creates a front-end IP configuration named FrontendIpConfig01 using the public IP address in $publicip, and then stores it in the $frontend variable. The third command creates an inbound NAT rule configuration named MyInboundNatRule using the front-end object in $frontend. The TCP protocol is specified and the front-end port is 3389, the same as the backend port in this case. The FrontendIpConfiguration, Procotol, FrontendPort, and BackendPort parameters are all required to create an inbound NAT rule configuration.

Required Parameters

-Name

Specifies the name of the rule configuration that this cmdlet creates.

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

Optional Parameters

-BackendPort

Specifies the backend port for traffic that is matched by this rule configuration.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-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:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EnableFloatingIP

Indicates that this cmdlet enables a floating IP address for a rule configuration.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EnableTcpReset

Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-FrontendIpConfiguration

Specifies a list of front-end IP addresses to associate with a load balancer rule configuration.

Type:PSFrontendIPConfiguration
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-FrontendIpConfigurationId

Specifies the ID for a front-end IP address configuration.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-FrontendPort

Specifies the front-end port that is matched by a load balancer rule configuration.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-IdleTimeoutInMinutes

Specifies the length of time, in minutes, for which the state of conversations is maintained in a load balancer.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Protocol

Specifies a protocol. The acceptable values for this parameter are:

  • Tcp
  • Udp
Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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

PSInboundNatRule