You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -15,9 +15,9 @@ An inbound NAT rule is used to forward traffic from a load balancer frontend to
15
15
16
16
There are two types of inbound NAT rule:
17
17
18
-
*Inbound NAT rule V1 for VMs - Targets a single machine in the backend pool of the load balancer
18
+
-**Inbound NAT rule V1 for virtual machines**: Targets a single machine in the backend pool of the load balancer.
19
19
20
-
*Inbound NAT rule V2 for VMs and VMSS- Targets multiple virtual machines in the backend pool of the load balancer
20
+
-**Inbound NAT rule V2 for virtual machines and virtual machine scale sets**: Targets multiple virtual machines in the backend pool of the load balancer.
21
21
22
22
In this article, you learn how to add and remove an inbound NAT rule for both types. You learn how to change the frontend port allocation in a multiple instance inbound NAT rule. You can choose from the Azure portal, PowerShell, or CLI examples.
23
23
@@ -30,7 +30,7 @@ In this article, you learn how to add and remove an inbound NAT rule for both ty
Choose this option to configure a rule for a single VM. Select Azure portal, PowerShell, or CLI for instructions.
36
36
@@ -48,8 +48,6 @@ In this example, you create an inbound NAT rule to forward port **500** to backe
48
48
49
49
5. Select **+ Add** in **Inbound NAT rules** to add the rule.
50
50
51
-
:::image type="content" source="./media/manage-inbound-nat-rules/add-rule.png" alt-text="Screenshot of the inbound NAT rules page for Azure Load Balancer":::
52
-
53
51
6. Enter or select the following information in **Add inbound NAT rule**.
54
52
55
53
| Setting | Value |
@@ -66,27 +64,23 @@ In this example, you create an inbound NAT rule to forward port **500** to backe
66
64
67
65
7. Leave the rest of the settings at the defaults and select **Add**.
68
66
69
-
:::image type="content" source="./media/manage-inbound-nat-rules/add-single-instance-rule.png" alt-text="Screenshot of the create inbound NAT rule page":::
Use [Get-AzLoadBalancer](/powershell/module/az.network/get-azloadbalancer) to place the load balancer information into a variable.
69
+
In this example, you create an inbound NAT rule to forward port **500** to backend port **443**.
74
70
75
-
Use [Add-AzLoadBalancerInboundNatRuleConfig](/powershell/module/az.network/add-azloadbalancerinboundnatruleconfig) to create the inbound NAT rule.
71
+
-Use [Get-AzLoadBalancer](/powershell/module/az.network/get-azloadbalancer) to place the load balancer information into a variable.
76
72
77
-
To save the configuration to the load balancer, use [Set-AzLoadBalancer](/powershell/module/az.network/set-azloadbalancer).
73
+
- Use [Add-AzLoadBalancerInboundNatRuleConfig](/powershell/module/az.network/add-azloadbalancerinboundnatruleconfig) to create the inbound NAT rule.
74
+
- To save the configuration to the load balancer, use [Set-AzLoadBalancer](/powershell/module/az.network/set-azloadbalancer).
78
75
79
-
Use [Get-AzLoadBalancerInboundNatRuleConfig](/powershell/module/az.network/get-azloadbalancerinboundnatruleconfig) to place the newly created inbound NAT rule information into a variable.
76
+
-Use [Get-AzLoadBalancerInboundNatRuleConfig](/powershell/module/az.network/get-azloadbalancerinboundnatruleconfig) to place the newly created inbound NAT rule information into a variable.
80
77
81
-
Use [Get-AzNetworkInterface](/powershell/module/az.network/get-aznetworkinterface) to place the network interface information into a variable.
78
+
-Use [Get-AzNetworkInterface](/powershell/module/az.network/get-aznetworkinterface) to place the network interface information into a variable.
82
79
83
-
Use [Set-AzNetworkInterfaceIpConfig](/powershell/module/az.network/set-aznetworkinterfaceipconfig) to add the newly created inbound NAT rule to the IP configuration of the network interface.
80
+
-Use [Set-AzNetworkInterfaceIpConfig](/powershell/module/az.network/set-aznetworkinterfaceipconfig) to add the newly created inbound NAT rule to the IP configuration of the network interface.
84
81
85
82
To save the configuration to the network interface, use [Set-AzNetworkInterface](/powershell/module/az.network/set-aznetworkinterface).
86
83
87
-
88
-
89
-
90
84
```azurepowershell
91
85
## Place the load balancer information into a variable for later use. ##
92
86
$slb = @{
@@ -140,9 +134,9 @@ $NIC | Set-AzNetworkInterface
140
134
141
135
In this example, you will create an inbound NAT rule to forward port **500** to backend port **443**. You will then attach the inbound NAT rule to a VM's NIC
142
136
143
-
Use [az network lb inbound-nat-rule create](/cli/azure/network/lb/inbound-nat-rule#az-network-lb-inbound-nat-rule-create) to create the NAT rule.
137
+
-Use [az network lb inbound-nat-rule create](/cli/azure/network/lb/inbound-nat-rule#az-network-lb-inbound-nat-rule-create) to create the NAT rule.
144
138
145
-
Use [az network nic ip-config inbound-nat-rule add](/cli/azure/network/nic/ip-config/inbound-nat-rule) to add the inbound NAT rule to a VM's NIC
139
+
-Use [az network nic ip-config inbound-nat-rule add](/cli/azure/network/nic/ip-config/inbound-nat-rule) to add the inbound NAT rule to a VM's NIC
0 commit comments