Skip to content

Commit a8b131d

Browse files
committed
Task 544781: Update DNAT tutorial with additional refinements
Changes: - Additional content refinements and corrections - Ensured consistency in tutorial flow - Updated formatting and structure Related to parent work item #545010 (Sprint 2 Bastion updates)
1 parent 4a73049 commit a8b131d

1 file changed

Lines changed: 21 additions & 18 deletions

File tree

articles/firewall/tutorial-firewall-dnat-policy.md

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ Create a workload virtual machine, and place it in the **SN-Workload** subnet.
122122
1. For **Username**, type **azureuser**.
123123
1. For **SSH public key source**, select **Generate new key pair**.
124124
1. For **Key pair name**, type **Srv-Workload_key**.
125+
1. Select **None** in **Public inbound ports**.
125126
1. Select **Next: Disks**.
126127

127128
**Disks**
@@ -152,6 +153,25 @@ Review the summary, and then select **Create**.
152153

153154
After deployment finishes, note the private IP address for the virtual machine. It will be used later when you configure the firewall. Select the virtual machine name, and under **Settings**, select **Networking** to find the private IP address.
154155

156+
## Install web server
157+
158+
Use the Azure portal Run Command feature to install a web server on the virtual machine.
159+
160+
1. Navigate to the **Srv-Workload** virtual machine in the Azure portal.
161+
1. Under **Operations**, select **Run command**.
162+
1. Select **RunShellScript**.
163+
1. In the **Run Command Script** window, paste the following script:
164+
165+
```bash
166+
sudo apt-get update
167+
sudo apt-get install -y nginx
168+
echo "<h1>Azure Firewall DNAT Demo - $(hostname)</h1>" | sudo tee /var/www/html/index.html
169+
```
170+
171+
1. Select **Run**.
172+
1. Wait for the script to complete. The output should show successful installation of Nginx.
173+
174+
155175
## Deploy the firewall and policy
156176

157177
1. From the portal home page, select **Create a resource**.
@@ -170,6 +190,7 @@ After deployment finishes, note the private IP address for the virtual machine.
170190
|Choose a virtual network |**Use existing**: VN-Hub|
171191
|Public IP address |**Add new**, Name: **fw-pip**.|
172192

193+
1. Uncheck the box next to **Enable Firewall Management NIC**.
173194
5. Accept the other defaults, and then select **Review + create**.
174195
6. Review the summary, and then select **Create** to create the firewall.
175196

@@ -207,24 +228,6 @@ For the **SN-Workload** subnet, you configure the outbound default route to go t
207228
18. For **Next hop address**, type the private IP address for the firewall that you noted previously.
208229
19. Select **OK**.
209230

210-
## Install web server
211-
212-
Use the Azure portal Run Command feature to install a web server on the virtual machine.
213-
214-
1. Navigate to the **Srv-Workload** virtual machine in the Azure portal.
215-
1. Under **Operations**, select **Run command**.
216-
1. Select **RunShellScript**.
217-
1. In the **Run Command Script** window, paste the following script:
218-
219-
```bash
220-
sudo apt-get update
221-
sudo apt-get install -y nginx
222-
echo "<h1>Azure Firewall DNAT Demo - $(hostname)</h1>" | sudo tee /var/www/html/index.html
223-
```
224-
225-
1. Select **Run**.
226-
1. Wait for the script to complete. The output should show successful installation of Nginx.
227-
228231
## Configure a DNAT rule
229232

230233
This rule allows inbound HTTP traffic from the Internet to reach the web server through the firewall.

0 commit comments

Comments
 (0)