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
Copy file name to clipboardExpand all lines: articles/load-balancer/tutorial-load-balancer-port-forwarding-portal.md
+49-45Lines changed: 49 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ author: mbender-ms
6
6
ms.author: mbender
7
7
ms.service: load-balancer
8
8
ms.topic: tutorial
9
-
ms.date: 03/08/2022
9
+
ms.date: 10/18/2022
10
10
ms.custom: template-tutorial
11
11
---
12
12
@@ -24,75 +24,79 @@ In this tutorial, you learn how to:
24
24
> * Create a NAT gateway for outbound internet access for the backend pool
25
25
> * Install and configure a web server on the VMs to demonstrate the port forwarding and load-balancing rules
26
26
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
+
27
29
## Prerequisites
28
30
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.
30
36
31
37
## Create virtual network and virtual machines
32
38
33
39
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.
34
40
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.
36
42
37
-
2. In the search box at the top of the portal, enter **Virtual machine**. Select **Virtual machines** in the search results.
| Azure Spot instance | Leave the default of unchecked. |
56
60
| Size | Select a VM size. |
57
61
|**Administrator account**||
58
62
| Authentication type | Select **SSH public key**. |
59
-
| Username | Enter **azureuser**. |
63
+
| Username | Enter *azureuser*. |
60
64
| SSH public key source | Select **Generate new key pair**. |
61
-
| Key pair name | Enter **myKey**. |
65
+
| Key pair name | Enter *myKey*. |
62
66
|**Inbound port rules**||
63
67
| Public inbound ports | Select **None**. |
64
68
65
69
:::image type="content" source="./media/tutorial-load-balancer-port-forwarding-portal/create-vm-portal.png" alt-text="Screenshot of create virtual machine.":::
66
70
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**.
68
72
69
-
6. In the **Networking** tab, enter or select the following information.
73
+
5. In the **Networking** tab, enter or select the following information.
70
74
71
75
| Setting | Value |
72
76
| ------- | ----- |
73
77
|**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**. |
75
79
| Subnet | Select **myBackendSubnet**. |
76
80
| Public IP | Select **None**. |
77
81
| 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**. |
79
83
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.
81
85
82
-
8. Select **Create**.
86
+
7. Select **Create**.
83
87
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.
85
89
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**:
87
91
88
-
| Setting |VM 2|
92
+
| Setting |Value|
89
93
| ------- | ----- |
90
94
|**Basics**||
91
95
|**Instance details**||
92
-
| Virtual machine name |**myVM2**|
93
-
| Availability zone |**2**|
96
+
| Virtual machine name |Enter *myVM2*|
97
+
| Availability zone |Select **Zone 2**|
94
98
|**Administrator account**||
95
-
| Authentication type |**SSH public key**|
99
+
| Authentication type |Select **SSH public key**|
96
100
| SSH public key source | Select **Use existing key stored in Azure**. |
97
101
| Stored Keys | Select **myKey**. |
98
102
|**Inbound port rules**||
@@ -119,7 +123,7 @@ You'll create a load balancer in this section. The frontend IP, backend pool, lo
119
123
| Subscription | Select your subscription. |
120
124
| Resource group | Select **TutorialLBPF-rg**. |
121
125
|**Instance details**||
122
-
| Name | Enter **myLoadBalancer**|
126
+
| Name | Enter *myLoadBalancer*|
123
127
| Region | Select **West US 2**. |
124
128
| SKU | Leave the default **Standard**. |
125
129
| Type | Select **Public**. |
@@ -129,7 +133,7 @@ You'll create a load balancer in this section. The frontend IP, backend pool, lo
129
133
130
134
5. In **Frontend IP configuration**, select **+ Add a frontend IP**.
131
135
132
-
6. Enter **myFrontend** in **Name**.
136
+
6. Enter *myFrontend* in **Name**.
133
137
134
138
7. Select **IPv4** or **IPv6** for the **IP version**.
135
139
@@ -143,7 +147,7 @@ You'll create a load balancer in this section. The frontend IP, backend pool, lo
143
147
144
148
9. Select **Create new** in **Public IP address**.
145
149
146
-
10. In **Add a public IP address**, enter **myPublicIP** for **Name**.
150
+
10. In **Add a public IP address**, enter *myPublicIP* for **Name**.
147
151
148
152
11. Select **Zone-redundant** in **Availability zone**.
149
153
@@ -164,7 +168,7 @@ You'll create a load balancer in this section. The frontend IP, backend pool, lo
@@ -185,14 +189,14 @@ You'll create a load balancer in this section. The frontend IP, backend pool, lo
185
189
186
190
| Setting | Value |
187
191
| ------- | ----- |
188
-
| Name | Enter **myHTTPRule**|
192
+
| Name | Enter *myHTTPRule*|
189
193
| IP Version | Select **IPv4** or **IPv6** depending on your requirements. |
190
194
| Frontend IP address | Select **myFrontend**. |
191
195
| Backend pool | Select **myBackendPool**. |
192
196
| 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**. |
196
200
| Session persistence | Select **None**. |
197
201
| Idle timeout (minutes) | Enter or select **15**. |
198
202
| TCP reset | Select **Enabled**. |
@@ -209,13 +213,13 @@ You'll create a load balancer in this section. The frontend IP, backend pool, lo
209
213
210
214
| Setting | Value |
211
215
| ------- | ----- |
212
-
| Name | Enter **myNATRuleVM1-221**. |
216
+
| Name | Enter *myNATRuleVM1-221*. |
213
217
| Target virtual machine | Select **myVM1**. |
214
218
| Network IP configuration | Select **ipconfig1 (10.1.0.4)**. |
215
219
| Frontend IP address | Select **myFrontend**. |
216
-
| Frontend Port | Enter **221**. |
220
+
| Frontend Port | Enter *221*. |
217
221
| Service Tag | Select **Custom**. |
218
-
| Backend port | Enter **22**. |
222
+
| Backend port | Enter *22*. |
219
223
| Protocol | Leave the default of **TCP**. |
220
224
| TCP Reset | Leave the default of unchecked. |
221
225
| 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
229
233
230
234
| Setting | Value |
231
235
| ------- | ----- |
232
-
| Name | Enter **myNATRuleVM2-222**. |
236
+
| Name | Enter *myNATRuleVM2-222*. |
233
237
| Target virtual machine | Select **myVM2**. |
234
238
| Network IP configuration | Select **ipconfig1 (10.1.0.5)**. |
235
239
| Frontend IP address | Select **myFrontend**. |
236
-
| Frontend Port | Enter **222**. |
240
+
| Frontend Port | Enter *222*. |
237
241
| Service Tag | Select **Custom**. |
238
-
| Backend port | Enter **22**. |
242
+
| Backend port | Enter *22*. |
239
243
| Protocol | Leave the default of **TCP**. |
240
244
| TCP Reset | Leave the default of unchecked. |
241
245
| Idle timeout (minutes) | Leave the default **4**. |
@@ -265,16 +269,16 @@ For more information about outbound connections and Azure Virtual Network NAT, s
265
269
| Subscription | Select your subscription. |
266
270
| Resource group | Select **TutorialLBPF-rg**. |
267
271
|**Instance details**||
268
-
| NAT gateway name | Enter **myNATgateway**. |
272
+
| NAT gateway name | Enter *myNATgateway*. |
269
273
| Region | Select **West US 2**. |
270
274
| Availability zone | Select **None**. |
271
-
| Idle timeout (minutes) | Enter **15**. |
275
+
| Idle timeout (minutes) | Enter *15*. |
272
276
273
277
4. Select the **Outbound IP** tab or select the **Next: Outbound IP** button at the bottom of the page.
274
278
275
279
5. In **Outbound IP**, select **Create a new public IP address** next to **Public IP addresses**.
276
280
277
-
6. Enter **myNATGatewayIP** in **Name** in **Add a public IP address**.
281
+
6. Enter *myNATGatewayIP* in **Name** in **Add a public IP address**.
278
282
279
283
7. Select **OK**.
280
284
@@ -292,7 +296,7 @@ For more information about outbound connections and Azure Virtual Network NAT, s
292
296
293
297
In this section, you'll SSH to the virtual machines through the inbound NAT rules and install a web server.
294
298
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.
296
300
297
301
2. Select **myLoadBalancer**.
298
302
@@ -360,11 +364,11 @@ the virtual machines and load balancer with the following steps:
360
364
361
365
3. Select **Delete resource group**.
362
366
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**.
364
368
365
369
## Next steps
366
370
367
371
Advance to the next article to learn how to create a cross-region load balancer:
368
372
369
373
> [!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