Skip to content

Commit 2e884be

Browse files
authored
Merge pull request #214893 from halkazwini/lb-vm-nat
Load Balancer: Freshness: Create a single virtual machine inbound NAT rule using the Azure portal
2 parents 8043489 + 70922c2 commit 2e884be

File tree

1 file changed

+49
-45
lines changed

1 file changed

+49
-45
lines changed

articles/load-balancer/tutorial-load-balancer-port-forwarding-portal.md

Lines changed: 49 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: mbender-ms
66
ms.author: mbender
77
ms.service: load-balancer
88
ms.topic: tutorial
9-
ms.date: 03/08/2022
9+
ms.date: 10/18/2022
1010
ms.custom: template-tutorial
1111
---
1212

@@ -24,75 +24,79 @@ In this tutorial, you learn how to:
2424
> * Create a NAT gateway for outbound internet access for the backend pool
2525
> * Install and configure a web server on the VMs to demonstrate the port forwarding and load-balancing rules
2626
27+
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
28+
2729
## Prerequisites
2830

29-
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
31+
- An Azure account with an active subscription.
32+
33+
## Sign in to Azure
34+
35+
Sign in to the Azure portal at https://portal.azure.com.
3036

3137
## Create virtual network and virtual machines
3238

3339
A virtual network and subnet is required for the resources in the tutorial. In this section, you'll create a virtual network and virtual machines for the later steps.
3440

35-
1. Sign in to the [Azure portal](https://portal.azure.com).
41+
1. In the search box at the top of the portal, enter **Virtual machine**. Select **Virtual machines** in the search results.
3642

37-
2. In the search box at the top of the portal, enter **Virtual machine**. Select **Virtual machines** in the search results.
38-
39-
3. In **Virtual machines**, select **+ Create** > **+ Virtual machine**.
43+
2. In **Virtual machines**, select **+ Create** > **+ Virtual machine**.
4044

41-
4. In **Create a virtual machine**, enter or select the following values in the **Basics** tab:
45+
3. In **Create a virtual machine**, enter or select the following values in the **Basics** tab:
4246

4347
| Setting | Value |
4448
| ------- | ----- |
4549
| **Project details** | |
4650
| Subscription | Select your subscription. |
47-
| Resource group | Select **Create new**. </br> Enter **TutorialLBPF-rg**. </br> Select **OK**. |
51+
| Resource group | Select **Create new**. </br> Enter *TutorialLBPF-rg*. </br> Select **OK**. |
4852
| **Instance details** | |
49-
| Virtual machine name | Enter **myVM1**. |
50-
| Region | Enter **(US) West US 2**. |
53+
| Virtual machine name | Enter *myVM1*. |
54+
| Region | Select **(US) West US 2**. |
5155
| Availability options | Select **Availability zone**. |
52-
| Availability zone | Enter **1**. |
56+
| Availability zone | Select **Zone 1**. |
5357
| Security type | Select **Standard**. |
5458
| Image | Select **Ubuntu Server 20.04 LTS - Gen2**. |
5559
| Azure Spot instance | Leave the default of unchecked. |
5660
| Size | Select a VM size. |
5761
| **Administrator account** | |
5862
| Authentication type | Select **SSH public key**. |
59-
| Username | Enter **azureuser**. |
63+
| Username | Enter *azureuser*. |
6064
| SSH public key source | Select **Generate new key pair**. |
61-
| Key pair name | Enter **myKey**. |
65+
| Key pair name | Enter *myKey*. |
6266
| **Inbound port rules** | |
6367
| Public inbound ports | Select **None**. |
6468

6569
:::image type="content" source="./media/tutorial-load-balancer-port-forwarding-portal/create-vm-portal.png" alt-text="Screenshot of create virtual machine.":::
6670

67-
5. Select the **Networking** tab, or select **Next: Disks**, then **Next: Networking**.
71+
4. Select the **Networking** tab, or select **Next: Disks**, then **Next: Networking**.
6872

69-
6. In the **Networking** tab, enter or select the following information.
73+
5. In the **Networking** tab, enter or select the following information.
7074

7175
| Setting | Value |
7276
| ------- | ----- |
7377
| **Network interface** | |
74-
| Virtual network | Select **Create new**. </br> Enter **myVNet** in **Name**. </br> In **Address space**, under **Address range**, enter **10.1.0.0/16**. </br> In **Subnets**, under **Subnet name**, enter **myBackendSubnet**. </br> In **Address range**, enter **10.1.0.0/24**. </br> Select **OK**. |
78+
| Virtual network | Select **Create new**. </br> Enter *myVNet* in **Name**. </br> In **Address space**, under **Address range**, enter *10.1.0.0/16*. </br> In **Subnets**, under **Subnet name**, enter *myBackendSubnet*. </br> In **Address range**, enter *10.1.0.0/24*. </br> Select **OK**. |
7579
| Subnet | Select **myBackendSubnet**. |
7680
| Public IP | Select **None**. |
7781
| NIC network security group | Select **Advanced**. |
78-
| Configure network security group | Select **Create new**. </br> Enter **myNSG** in **Name**. </br> Select **+ Add an inbound rule** under **Inbound rules**. </br> In **Service**, select **HTTP**. </br> Enter **100** in **Priority**. </br> Enter **myNSGRule** for **Name**. </br> Select **Add**. </br> Select **OK**. |
82+
| Configure network security group | Select **Create new**. </br> Enter *myNSG* in **Name**. </br> Select **+ Add an inbound rule** under **Inbound rules**. </br> In **Service**, select **HTTP**. </br> Enter *100* in **Priority**. </br> Enter *myNSGRule* for **Name**. </br> Select **Add**. </br> Select **OK**. |
7983

80-
7. Select the **Review + create** tab, or select the **Review + create** button at the bottom of the page.
84+
6. Select the **Review + create** tab, or select the **Review + create** button at the bottom of the page.
8185

82-
8. Select **Create**.
86+
7. Select **Create**.
8387

84-
9. At the **Generate new key pair** prompt, select **Download private key and create resource**. Your key file will be downloaded as myKey.pem. Ensure you know where the .pem file was downloaded, you'll need the path to the key file in later steps.
88+
8. At the **Generate new key pair** prompt, select **Download private key and create resource**. Your key file will be downloaded as myKey.pem. Ensure you know where the .pem file was downloaded, you'll need the path to the key file in later steps.
8589

86-
8. Follow the steps 1 through 8 to create another VM with the following values and all the other settings the same as **myVM1**:
90+
9. Follow the steps 1 through 7 to create another VM with the following values and all the other settings the same as **myVM1**:
8791

88-
| Setting | VM 2 |
92+
| Setting | Value |
8993
| ------- | ----- |
9094
| **Basics** | |
9195
| **Instance details** | |
92-
| Virtual machine name | **myVM2** |
93-
| Availability zone | **2** |
96+
| Virtual machine name | Enter *myVM2* |
97+
| Availability zone | Select **Zone 2** |
9498
| **Administrator account** | |
95-
| Authentication type | **SSH public key** |
99+
| Authentication type | Select **SSH public key** |
96100
| SSH public key source | Select **Use existing key stored in Azure**. |
97101
| Stored Keys | Select **myKey**. |
98102
| **Inbound port rules** | |
@@ -119,7 +123,7 @@ You'll create a load balancer in this section. The frontend IP, backend pool, lo
119123
| Subscription | Select your subscription. |
120124
| Resource group | Select **TutorialLBPF-rg**. |
121125
| **Instance details** | |
122-
| Name | Enter **myLoadBalancer** |
126+
| Name | Enter *myLoadBalancer* |
123127
| Region | Select **West US 2**. |
124128
| SKU | Leave the default **Standard**. |
125129
| Type | Select **Public**. |
@@ -129,7 +133,7 @@ You'll create a load balancer in this section. The frontend IP, backend pool, lo
129133

130134
5. In **Frontend IP configuration**, select **+ Add a frontend IP**.
131135

132-
6. Enter **myFrontend** in **Name**.
136+
6. Enter *myFrontend* in **Name**.
133137

134138
7. Select **IPv4** or **IPv6** for the **IP version**.
135139

@@ -143,7 +147,7 @@ You'll create a load balancer in this section. The frontend IP, backend pool, lo
143147
144148
9. Select **Create new** in **Public IP address**.
145149

146-
10. In **Add a public IP address**, enter **myPublicIP** for **Name**.
150+
10. In **Add a public IP address**, enter *myPublicIP* for **Name**.
147151

148152
11. Select **Zone-redundant** in **Availability zone**.
149153

@@ -164,7 +168,7 @@ You'll create a load balancer in this section. The frontend IP, backend pool, lo
164168

165169
| Setting | Value |
166170
| ------- | ----- |
167-
| Name | Enter **myBackendPool**. |
171+
| Name | Enter *myBackendPool*. |
168172
| Virtual network | Select **myVNet (TutorialLBPF-rg)**. |
169173
| Backend Pool Configuration | Select **NIC**. |
170174
| IP version | Select **IPv4**. |
@@ -185,14 +189,14 @@ You'll create a load balancer in this section. The frontend IP, backend pool, lo
185189

186190
| Setting | Value |
187191
| ------- | ----- |
188-
| Name | Enter **myHTTPRule** |
192+
| Name | Enter *myHTTPRule* |
189193
| IP Version | Select **IPv4** or **IPv6** depending on your requirements. |
190194
| Frontend IP address | Select **myFrontend**. |
191195
| Backend pool | Select **myBackendPool**. |
192196
| Protocol | Select **TCP**. |
193-
| Port | Enter **80**. |
194-
| Backend port | Enter **80**. |
195-
| Health probe | Select **Create new**. </br> In **Name**, enter **myHealthProbe**. </br> Select **TCP** in **Protocol**. </br> Leave the rest of the defaults, and select **OK**. |
197+
| Port | Enter *80*. |
198+
| Backend port | Enter *80*. |
199+
| Health probe | Select **Create new**. </br> In **Name**, enter *myHealthProbe*. </br> Select **TCP** in **Protocol**. </br> Leave the rest of the defaults, and select **OK**. |
196200
| Session persistence | Select **None**. |
197201
| Idle timeout (minutes) | Enter or select **15**. |
198202
| TCP reset | Select **Enabled**. |
@@ -209,13 +213,13 @@ You'll create a load balancer in this section. The frontend IP, backend pool, lo
209213

210214
| Setting | Value |
211215
| ------- | ----- |
212-
| Name | Enter **myNATRuleVM1-221**. |
216+
| Name | Enter *myNATRuleVM1-221*. |
213217
| Target virtual machine | Select **myVM1**. |
214218
| Network IP configuration | Select **ipconfig1 (10.1.0.4)**. |
215219
| Frontend IP address | Select **myFrontend**. |
216-
| Frontend Port | Enter **221**. |
220+
| Frontend Port | Enter *221*. |
217221
| Service Tag | Select **Custom**. |
218-
| Backend port | Enter **22**. |
222+
| Backend port | Enter *22*. |
219223
| Protocol | Leave the default of **TCP**. |
220224
| TCP Reset | Leave the default of unchecked. |
221225
| Idle timeout (minutes) | Leave the default **4**. |
@@ -229,13 +233,13 @@ You'll create a load balancer in this section. The frontend IP, backend pool, lo
229233

230234
| Setting | Value |
231235
| ------- | ----- |
232-
| Name | Enter **myNATRuleVM2-222**. |
236+
| Name | Enter *myNATRuleVM2-222*. |
233237
| Target virtual machine | Select **myVM2**. |
234238
| Network IP configuration | Select **ipconfig1 (10.1.0.5)**. |
235239
| Frontend IP address | Select **myFrontend**. |
236-
| Frontend Port | Enter **222**. |
240+
| Frontend Port | Enter *222*. |
237241
| Service Tag | Select **Custom**. |
238-
| Backend port | Enter **22**. |
242+
| Backend port | Enter *22*. |
239243
| Protocol | Leave the default of **TCP**. |
240244
| TCP Reset | Leave the default of unchecked. |
241245
| Idle timeout (minutes) | Leave the default **4**. |
@@ -265,16 +269,16 @@ For more information about outbound connections and Azure Virtual Network NAT, s
265269
| Subscription | Select your subscription. |
266270
| Resource group | Select **TutorialLBPF-rg**. |
267271
| **Instance details** | |
268-
| NAT gateway name | Enter **myNATgateway**. |
272+
| NAT gateway name | Enter *myNATgateway*. |
269273
| Region | Select **West US 2**. |
270274
| Availability zone | Select **None**. |
271-
| Idle timeout (minutes) | Enter **15**. |
275+
| Idle timeout (minutes) | Enter *15*. |
272276

273277
4. Select the **Outbound IP** tab or select the **Next: Outbound IP** button at the bottom of the page.
274278

275279
5. In **Outbound IP**, select **Create a new public IP address** next to **Public IP addresses**.
276280

277-
6. Enter **myNATGatewayIP** in **Name** in **Add a public IP address**.
281+
6. Enter *myNATGatewayIP* in **Name** in **Add a public IP address**.
278282

279283
7. Select **OK**.
280284

@@ -292,7 +296,7 @@ For more information about outbound connections and Azure Virtual Network NAT, s
292296

293297
In this section, you'll SSH to the virtual machines through the inbound NAT rules and install a web server.
294298

295-
1. In the search box at the top of the portal, enter **Load balancer**. Select **Load balancers** in the search results.
299+
1. In the search box at the top of the portal, enter *Load balancer*. Select **Load balancers** in the search results.
296300

297301
2. Select **myLoadBalancer**.
298302

@@ -360,11 +364,11 @@ the virtual machines and load balancer with the following steps:
360364

361365
3. Select **Delete resource group**.
362366

363-
4. Enter **TutorialLBPF-rg** in **TYPE THE RESOURCE GROUP NAME:**. Select **Delete**.
367+
4. Enter *TutorialLBPF-rg* in **TYPE THE RESOURCE GROUP NAME:**. Select **Delete**.
364368

365369
## Next steps
366370

367371
Advance to the next article to learn how to create a cross-region load balancer:
368372

369373
> [!div class="nextstepaction"]
370-
> [Create a cross-region load balancer using the Azure portal](tutorial-cross-region-portal.md)
374+
> [Create a multiple virtual machines inbound NAT rule using the Azure portal](tutorial-nat-rule-multi-instance-portal.md)

0 commit comments

Comments
 (0)