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
Task 544782: Replace DNAT with Bastion for secure access
- Changed VM from Windows Server 2019 to Ubuntu 22.04 LTS
- Replaced password authentication with SSH keys (Azure-generated)
- Removed NAT rule collection configuration entirely
- Replaced DNAT section with Azure Bastion deployment
- Added AzureBastionSubnet (192.168.2.0/26) to VN-Spoke
- Deployed Bastion with Developer SKU for secure access
- Updated testing section to use Bastion SSH connection
- Emphasized security benefits of Bastion over DNAT
- Updated article to show modern best practice approach
Copy file name to clipboardExpand all lines: articles/firewall/tutorial-firewall-dnat.md
+51-22Lines changed: 51 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,15 +100,20 @@ Now peer the two VNets.
100
100
Create a workload virtual machine, and place it in the **SN-Workload** subnet.
101
101
102
102
1. From the Azure portal menu, select **Create a resource**.
103
-
2. Under **Popular Marketplace products**, select **Windows Server 2019 Datacenter**.
103
+
2. Under **Popular Marketplace products**, select **Ubuntu Server 22.04 LTS**.
104
104
105
105
**Basics**
106
106
107
107
1. For **Subscription**, select your subscription.
108
108
2. For **Resource group**, select **RG-DNAT-Test**.
109
109
3. For **Virtual machine name**, type **Srv-Workload**.
110
110
4. For **Region**, select the same location that you used previously.
111
-
5. Type a username and password.
111
+
5. For **Image**, select **Ubuntu Server 22.04 LTS - x64 Gen2**.
112
+
6. For **Size**, select **Standard_B2s**.
113
+
7. For **Authentication type**, select **SSH public key**.
114
+
8. For **Username**, type **azureuser**.
115
+
9. For **SSH public key source**, select **Generate new key pair**.
116
+
10. For **Key pair name**, type **Srv-Workload_key**.
112
117
6. Select **Next: Disks**.
113
118
114
119
**Disks**
@@ -136,6 +141,8 @@ Create a workload virtual machine, and place it in the **SN-Workload** subnet.
136
141
137
142
Review the summary, and then select **Create**. This process takes a few minutes to complete.
138
143
144
+
1. On the **Generate new key pair** dialog, select **Download private key and create resource**. Save the key file as **Srv-Workload_key.pem**.
145
+
139
146
After the deployment finishes, note the private IP address of the virtual machine. You need this IP address later when configuring the firewall. Select the virtual machine name, go to **Overview**, and under **Networking**, note the private IP address.
The deployment process takes approximately 10 minutes to complete.
217
238
218
239
## Test the firewall
219
240
220
-
1. Connect a remote desktop to the firewall's public IP address. You should be connected to the **Srv-Workload** virtual machine.
221
-
2. Close the remote desktop.
241
+
Now test secure connectivity using Azure Bastion.
242
+
243
+
1. In the Azure portal, navigate to the **Srv-Workload** virtual machine.
244
+
1. Select **Connect** > **Connect via Bastion**.
245
+
1. Select **Use SSH Private Key from Local File**.
246
+
1. For **Username**, type **azureuser**.
247
+
1. Browse to and select the **Srv-Workload_key.pem** file you downloaded during VM creation.
248
+
1. Select **Connect**.
249
+
250
+
You should successfully connect to the Srv-Workload virtual machine through Azure Bastion. This provides secure access without exposing the VM through DNAT rules or requiring a public IP address.
0 commit comments