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 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)
Copy file name to clipboardExpand all lines: articles/firewall/tutorial-firewall-dnat-policy.md
+21-18Lines changed: 21 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,6 +122,7 @@ Create a workload virtual machine, and place it in the **SN-Workload** subnet.
122
122
1. For **Username**, type **azureuser**.
123
123
1. For **SSH public key source**, select **Generate new key pair**.
124
124
1. For **Key pair name**, type **Srv-Workload_key**.
125
+
1. Select **None** in **Public inbound ports**.
125
126
1. Select **Next: Disks**.
126
127
127
128
**Disks**
@@ -152,6 +153,25 @@ Review the summary, and then select **Create**.
152
153
153
154
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.
154
155
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
+
155
175
## Deploy the firewall and policy
156
176
157
177
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.
170
190
|Choose a virtual network |**Use existing**: VN-Hub|
171
191
|Public IP address |**Add new**, Name: **fw-pip**.|
172
192
193
+
1. Uncheck the box next to **Enable Firewall Management NIC**.
173
194
5. Accept the other defaults, and then select **Review + create**.
174
195
6. Review the summary, and then select **Create** to create the firewall.
175
196
@@ -207,24 +228,6 @@ For the **SN-Workload** subnet, you configure the outbound default route to go t
207
228
18. For **Next hop address**, type the private IP address for the firewall that you noted previously.
208
229
19. Select **OK**.
209
230
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
-
228
231
## Configure a DNAT rule
229
232
230
233
This rule allows inbound HTTP traffic from the Internet to reach the web server through the firewall.
0 commit comments