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/nat-gateway/tutorial-hub-spoke-route-nat.md
+22-18Lines changed: 22 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -276,10 +276,11 @@ The simulated NVA acts as a virtual appliance to route all traffic between the s
276
276
| VM architecture | Leave the default of **x64**. |
277
277
| Size | Select a size. |
278
278
|**Administrator account**||
279
-
| Authentication type | Select **Password**. |
279
+
| Authentication type | Select **SSH public key**. |
280
280
| Username | Enter a username. |
281
-
| Password | Enter a password. |
282
-
| Confirm password | Reenter password. |
281
+
| SSH public key source | Select **Generate new key pair**. |
282
+
| SSH Key Type | Leave the default of **RSA SSH Format**. |
283
+
| Key pair name | Enter **ssh-key**. |
283
284
|**Inbound port rules**||
284
285
| Public inbound ports | Select **None**. |
285
286
@@ -300,6 +301,10 @@ The simulated NVA acts as a virtual appliance to route all traffic between the s
300
301
301
302
1. Select **Create**.
302
303
304
+
1. The **Generate new key pair** dialog box appears. Select **Download private key and create resource**.
305
+
306
+
The private key will download to your local machine. The private key is needed in later steps for connecting to the virtual machine with Azure Bastion. The name of the private key file is the name you entered in the **Key pair name** field. In this example, the private key file is named **ssh-key**.
307
+
303
308
# [**Powershell**](#tab/powershell)
304
309
305
310
# [**CLI**](#tab/cli)
@@ -390,6 +395,8 @@ The IP configuration of the primary network interface of the virtual machine is
390
395
| Private IP address | Enter **10.0.0.10**. |
391
396
392
397
1. Select **Create**.
398
+
399
+
1. Start the virtual machine.
393
400
394
401
# [**Powershell**](#tab/powershell)
395
402
@@ -451,28 +458,27 @@ The routing for the simulated NVA uses IP tables and internal NAT in the Ubuntu
451
458
452
459
1. Enter the **Username** that you used when creating the virtual machine. In this example, the user is named **azureuser**, replace with the username you created.
453
460
454
-
1. In **Local File**, select the folder icon and browse to the private key file that was generated when you created the VM. The private key file is typically named `id_rsa` or `id_rsa.pem`.
461
+
1. In **Local File**, select the folder icon and browse to the private key file that was generated when you created the VM. The private key file is typically named `id_rsa` or `id_rsa.pem` or `ssh-key.pem`.
455
462
456
463
1. Select **Connect**.
457
464
458
465
1. Enter the following information at the prompt of the virtual machine to enable IP forwarding:
459
466
460
467
```bash
461
-
sudo vim /etc/sysctl.conf
468
+
sudo nano /etc/sysctl.conf
462
469
```
463
470
464
-
1. In the Vim editor, remove the **`#`** from the line **`net.ipv4.ip_forward=1`**:
465
-
466
-
Press the **Insert** key.
471
+
1. In the Nano editor, remove the **`#`** from the line **`net.ipv4.ip_forward=1`**:
467
472
473
+
ex
468
474
```bash
469
475
# Uncomment the next line to enable packet forwarding for IPv4
470
476
net.ipv4.ip_forward=1
471
477
```
472
478
473
-
Press the **Esc**key.
479
+
Press **Ctrl + O**to save the file.
474
480
475
-
Enter**`:wq`**and press **Enter**.
481
+
Press**Ctrl + X**to exit the editor.
476
482
477
483
1. Enter the following information to enable internal NAT in the virtual machine:
478
484
@@ -490,23 +496,21 @@ The routing for the simulated NVA uses IP tables and internal NAT in the Ubuntu
490
496
exit
491
497
```
492
498
493
-
1. Use Vim to edit the configuration with the following information:
499
+
1. Use Nano to edit the configuration with the following information:
494
500
495
501
```bash
496
-
sudo vim /etc/rc.local
502
+
sudo nano /etc/rc.local
497
503
```
498
504
499
-
Press the **Insert** key.
500
-
501
505
Add the following line to the configuration file:
502
506
503
507
```bash
504
508
/sbin/iptables-restore < /etc/iptables/rules.v4
505
509
```
506
510
507
-
Press the **Esc**key.
511
+
Press **Ctrl + O**to save the file.
508
512
509
-
Enter**`:wq`**and press **Enter**.
513
+
Press**Ctrl + X**to exit the editor.
510
514
511
515
1. Reboot the virtual machine:
512
516
@@ -696,7 +700,7 @@ A virtual network peering is used to connect the hub to spoke one and spoke one
696
700
697
701
1. Select **vnet-hub**.
698
702
699
-
1. Select **Peerings** in **Settings**.
703
+
1. Expand **Settings**, then select **Peerings**.
700
704
701
705
1. Select **+ Add**.
702
706
@@ -784,7 +788,7 @@ Create a route table to force all inter-spoke and internet egress traffic throug
0 commit comments