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
@@ -161,16 +165,20 @@ Now you can peer the hub and spoke virtual networks.
161
165
## Deploy the servers
162
166
163
167
1. On the Azure portal, select **Create a resource**.
164
-
1. Select **Windows Server 2019 Datacenter** in the **Popular** list.
168
+
1. Search for **Ubuntu Server 22.04 LTS** and select it.
169
+
1. Select **Create** > **Virtual machine**.
165
170
1. Enter these values for the virtual machine:
166
171
167
172
|Setting |Value |
168
173
|---------|---------|
169
174
|Resource group |**fw-manager-rg**|
170
175
|Virtual machine name |**Srv-workload-01**|
171
176
|Region |**(US) East US**|
172
-
|Administrator user name |type a user name|
173
-
|Password |type a password|
177
+
|Image |**Ubuntu Server 22.04 LTS - x64 Gen2**|
178
+
|Authentication type |**SSH public key**|
179
+
|Username |**azureuser**|
180
+
|SSH public key source |**Generate new key pair**|
181
+
|Key pair name |**srv-workload-01_key**|
174
182
175
183
1. Under **Inbound port rules**, for **Public inbound ports**, select **None**.
176
184
1. Accept the other defaults and select **Next: Disks**.
@@ -182,8 +190,9 @@ Now you can peer the hub and spoke virtual networks.
182
190
1. Select **Disable** to disable boot diagnostics.
183
191
1. Accept the other defaults and select **Review + create**.
184
192
1. Review the settings on the summary page, and then select **Create**.
193
+
1. When prompted, download and save the private key file (for example, **srv-workload-01_key.pem**).
185
194
186
-
Use the information in the following table to configure another virtual machine named **Srv-Workload-02**. The rest of the configuration is the same as the **Srv-workload-01** virtual machine.
195
+
Use the information in the following table to configure another virtual machine named **Srv-Workload-02**. The rest of the configuration is the same as the **Srv-workload-01** virtual machine, but use a different key pair name such as **srv-workload-02_key**.
187
196
188
197
|Setting |Value |
189
198
|---------|---------|
@@ -192,6 +201,47 @@ Use the information in the following table to configure another virtual machine
192
201
193
202
After the servers are deployed, select a server resource, and in **Networking** note the private IP address for each server.
194
203
204
+
### Install Nginx on the servers
205
+
206
+
After the virtual machines are deployed, install Nginx on both servers to verify web connectivity later.
207
+
208
+
1. In the Azure portal, navigate to the **Srv-workload-01** virtual machine.
Deploy Azure Bastion in the Spoke-01 virtual network to securely connect to the virtual machines.
225
+
226
+
1. In the Azure portal, search for **Bastions** and select it.
227
+
1. Select **Create**.
228
+
1. Configure the Bastion with the following settings:
229
+
230
+
| Setting | Value |
231
+
|------------------------|----------------------|
232
+
| Subscription | Select your subscription |
233
+
| Resource group |**fw-manager-rg**|
234
+
| Name |**Bastion-01**|
235
+
| Region |**East US**|
236
+
| Tier |**Developer**|
237
+
| Virtual network |**Spoke-01**|
238
+
| Subnet |**AzureBastionSubnet (10.0.2.0/26)**|
239
+
240
+
1. Select **Review + create**, then select **Create**.
241
+
242
+
> [!NOTE]
243
+
> Azure Bastion deployment can take approximately 10 minutes to complete.
244
+
195
245
## Create a firewall policy and secure your hub
196
246
197
247
A firewall policy defines collections of rules to direct traffic on one or more Secured virtual hubs. You create your firewall policy and then secure your hub.
@@ -222,43 +272,24 @@ A firewall policy defines collections of rules to direct traffic on one or more
222
272
223
273
224
274
1. Select **Add**.
225
-
1. Add a **DNAT rule** so you can connect a remote desktop to the **Srv-Workload-01** virtual machine.
226
-
1. Select **Add a rule collection** and enter the following information.
| Destination |The **Srv-Workload-02**private IP address that you noted previously.|
292
+
| Destination |**10.0.0.0/16,10.1.0.0/16**|
262
293
263
294
264
295
1. Select **Add**, then select **Next: IDPS**.
@@ -302,37 +333,49 @@ Now you must ensure that network traffic gets routed through your firewall.
302
333
303
334
## Test the firewall
304
335
305
-
To test the firewall rules, connect a remote desktop using the firewall public IP address, which is NATed to **Srv-Workload-01**. From there, use a browser to test the application rule and connect a remote desktop to **Srv-Workload-02** to test the network rule.
336
+
To test the firewall rules, use Azure Bastion to connect to **Srv-Workload-01** and verify both the application and network rules are working.
306
337
307
338
### Test the application rule
308
339
309
340
Now, test the firewall rules to confirm that it works as expected.
310
341
311
-
1. Connect a remote desktop to firewall public IP address, and sign in.
342
+
1. In the Azure portal, navigate to the **Srv-workload-01** virtual machine.
343
+
1. Select **Connect** > **Connect via Bastion**.
344
+
1. Provide the username **azureuser** and upload the private key `.pem` file that you downloaded when you created the VM.
345
+
1. Select **Connect** to open an SSH session.
312
346
313
-
2. Open Internet Explorer and browse to `https://www.microsoft.com`.
314
-
3. Select **OK** > **Close** on the Internet Explorer security alerts.
347
+
1. In the SSH session, run the following command to test access to Microsoft:
315
348
316
-
You should see the Microsoft home page.
349
+
```bash
350
+
curl https://www.microsoft.com
351
+
```
317
352
318
-
4. Browse to `https://www.google.com`.
353
+
You should see HTML content returned, confirming access is allowed.
319
354
320
-
The firewall should block this.
355
+
1. Test access to Google (which should be blocked):
356
+
357
+
```bash
358
+
curl https://www.google.com
359
+
```
360
+
361
+
The request should timeout or fail, showing the firewall is blocking this site.
321
362
322
363
So now you verified that the firewall application rule is working:
323
364
324
365
* You can browse to the one allowed FQDN, but not to any others.
325
366
326
367
### Test the network rule
327
368
328
-
Now test the network rule.
369
+
Now test the network rule by connecting from **Srv-Workload-01** to **Srv-Workload-02** using HTTP.
370
+
371
+
1. Test HTTP connectivity to the Nginx web server on **Srv-Workload-02**:
329
372
330
-
- From Srv-Workload-01, open a remote desktop to the Srv-Workload-02 private IP address.
373
+
```bash
374
+
curl http://<Srv-Workload-02-private-IP>
375
+
```
331
376
332
-
A remote desktop should connect to Srv-Workload-02.
377
+
You should see the status returned by the web server.
333
378
334
-
So now you verified that the firewall network rule is working:
335
-
* You can connect a remote desktop to a server located in another virtual network.
0 commit comments