Skip to content

Commit 0346d52

Browse files
Merge pull request #311008 from asudbring/tsk544784-sfi-bastion
Simplify Firewall hybrid network classic rules tutorial testing
2 parents 012f20d + dafced8 commit 0346d52

2 files changed

Lines changed: 81 additions & 65 deletions

File tree

articles/firewall/tutorial-hybrid-portal-policy.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -445,36 +445,30 @@ This is a virtual machine that you use to connect using Azure Bastion. From ther
445445

446446
## Deploy Azure Bastion
447447

448-
Now deploy Azure Bastion in the hub virtual network to provide secure access to the on-premises virtual machine.
449-
450-
1. Navigate to the **VNet-hub** virtual network.
451-
1. Select **Subnets** > **+ Subnet**.
452-
1. Configure the new subnet:
453-
- **Name**: **AzureBastionSubnet** (this exact name is required)
454-
- **Subnet address range**: **10.5.3.0/26**
455-
1. Select **Save**.
448+
Now deploy Azure Bastion to provide secure access to the virtual machine.
456449

457450
1. On the Azure portal menu, select **Create a resource**.
458-
1. Search for **Bastion** and select it.
451+
1. In the search box, type **Bastion** and select it from the results.
459452
1. Select **Create**.
460-
1. Configure the Bastion deployment:
453+
1. On the **Create a Bastion** page, configure the following settings:
461454

462455
| Setting | Value |
463456
|---------|-------|
464-
| Subscription | Your subscription |
457+
| Subscription | Select your subscription |
465458
| Resource group | **FW-Hybrid-Test** |
466459
| Name | **Hub-Bastion** |
467460
| Region | Same as your other resources |
468461
| Tier | **Developer** |
469462
| Virtual network | **VNet-hub** |
470-
| Subnet | **AzureBastionSubnet** (auto-selected) |
471-
| Public IP address | Create new |
472-
| Public IP address name | **Bastion-pip** |
463+
| Subnet | Select **Manage subnet configuration** |
473464

465+
1. In the **Subnets** page, select **+ Subnet**.
466+
1. Configure the new subnet:
467+
- **Name**: **AzureBastionSubnet** (this name is required)
468+
- **Subnet address range**: **10.5.3.0/26**
469+
1. Select **Save** and close the subnets page.
474470
1. Select **Review + create**.
475-
1. Select **Create**.
476-
477-
The deployment takes about 10 minutes to complete.
471+
1. After validation passes, select **Create**.
478472

479473
## Test the firewall
480474

articles/firewall/tutorial-hybrid-portal.md

Lines changed: 70 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: firewall
55
author: duau
66
ms.service: azure-firewall
77
ms.topic: how-to
8-
ms.date: 08/31/2023
8+
ms.date: 01/28/2026
99
ms.author: duau
1010
#Customer intent: As an administrator, I want to control network access from an on-premises network to an Azure virtual network.
1111
# Customer intent: As a network administrator, I want to deploy and configure Azure Firewall in a hybrid network, so that I can effectively control and secure access between on-premises and Azure virtual networks.
@@ -187,17 +187,6 @@ First, add a network rule to allow web traffic:
187187
1. For **Destination Address**, enter **10.6.0.0/16**.
188188
1. For **Destination Ports**, enter **80**.
189189

190-
Now, add a rule to allow RDP traffic. On the second rule row, enter the following information:
191-
192-
1. For **Name**, enter **AllowRDP**.
193-
1. For **Protocol**, select **TCP**.
194-
1. For **Source type**, select **IP address**.
195-
1. For **Source**, enter **192.168.0.0/24**.
196-
1. For **Destination type**, select **IP address**.
197-
1. For **Destination Address**, enter **10.6.0.0/16**.
198-
1. For **Destination Ports**, enter **3389**.
199-
1. Select **Add**.
200-
201190
## Create and connect the VPN gateways
202191

203192
The hub and on-premises virtual networks are connected via VPN gateways.
@@ -376,17 +365,21 @@ Create the spoke workload and on-premises virtual machines, and place them in th
376365

377366
### Create the workload virtual machine
378367

379-
Create a virtual machine in the spoke virtual network that runs Internet Information Services (IIS) and has no public IP address:
368+
Create a virtual machine in the spoke virtual network that runs Nginx web server and has no public IP address:
380369

381370
1. On the Azure portal home page, select **Create a resource**.
382-
1. Under **Popular Marketplace products**, select **Windows Server 2019 Datacenter**.
371+
1. Under **Popular Marketplace products**, select **Ubuntu Server 22.04 LTS**.
383372
1. Enter these values for the virtual machine:
384373
- **Resource group**: Select **RG-fw-hybrid-test**.
385374
- **Virtual machine name**: Enter **VM-Spoke-01**.
386375
- **Region**: Select the same region that you used previously.
387-
- **User name**: Enter a username.
388-
- **Password**: Enter a password.
389-
1. For **Public inbound ports**, select **Allow selected ports**, and then select **HTTP (80)** and **RDP (3389)**.
376+
- **Image**: Ubuntu Server 22.04 LTS - x64 Gen2
377+
- **Size**: Standard_B2s
378+
- **Authentication type**: SSH public key
379+
- **Username**: **azureuser**
380+
- **SSH public key source**: Generate new key pair
381+
- **Key pair name**: **VM-Spoke-01_key**
382+
1. For **Public inbound ports**, select **None**.
390383
1. Select **Next: Disks**.
391384
1. Accept the defaults and select **Next: Networking**.
392385
1. For the virtual network, select **VNet-Spoke**. The subnet is **SN-Workload**.
@@ -395,67 +388,96 @@ Create a virtual machine in the spoke virtual network that runs Internet Informa
395388
1. Select **Next: Monitoring**.
396389
1. For **Boot diagnostics**, select **Disable**.
397390
1. Select **Review+Create**, review the settings on the summary page, and then select **Create**.
391+
1. On the **Generate new key pair** dialog, select **Download private key and create resource**. Save the key file as **VM-Spoke-01_key.pem**.
392+
393+
### Install Nginx
398394

399-
### Install IIS
400-
401-
1. On the Azure portal, open Azure Cloud Shell and make sure that it's set to **PowerShell**.
402-
1. Run the following command to install IIS on the virtual machine, and change the location if necessary:
403-
404-
```azurepowershell-interactive
405-
Set-AzVMExtension `
406-
-ResourceGroupName RG-fw-hybrid-test `
407-
-ExtensionName IIS `
408-
-VMName VM-Spoke-01 `
409-
-Publisher Microsoft.Compute `
410-
-ExtensionType CustomScriptExtension `
411-
-TypeHandlerVersion 1.4 `
412-
-SettingString '{"commandToExecute":"powershell Add-WindowsFeature Web-Server; powershell Add-Content -Path \"C:\\inetpub\\wwwroot\\Default.htm\" -Value $($env:computername)"}' `
413-
-Location EastUS
395+
1. In the Azure portal, navigate to the **VM-Spoke-01** virtual machine.
396+
1. Under **Operations**, select **Run command** > **RunShellScript**.
397+
1. In the **Run Command Script** pane, enter the following script:
398+
399+
```bash
400+
sudo apt-get update && sudo apt-get install -y nginx && echo '<h1>'$(hostname)'</h1>' | sudo tee /var/www/html/index.html
414401
```
415402

403+
1. Select **Run**.
404+
1. Wait for the command to complete. The output displays the hostname of the virtual machine.
405+
416406
### Create the on-premises virtual machine
417407

418-
Create a virtual machine that you use to connect via remote access to the public IP address. From there, you can connect to the spoke server through the firewall.
408+
Create a virtual machine that you use to connect via Azure Bastion. From there, you can connect to the spoke server through the firewall.
419409

420410
1. On the Azure portal home page, select **Create a resource**.
421-
1. Under **Popular**, select **Windows Server 2019 Datacenter**.
411+
1. Under **Popular**, select **Ubuntu Server 22.04 LTS**.
422412
1. Enter these values for the virtual machine:
423413
- **Resource group**: Select **Existing**, and then select **RG-fw-hybrid-test**.
424414
- **Virtual machine name**: Enter **VM-Onprem**.
425415
- **Region**: Select the same region that you used previously.
426-
- **User name**: Enter a username.
427-
- **Password**: Enter a user password.
428-
1. For **Public inbound ports**, select **Allow selected ports**, and then select **RDP (3389)**.
416+
- **Image**: Ubuntu Server 22.04 LTS - x64 Gen2
417+
- **Size**: Standard_B2s
418+
- **Authentication type**: SSH public key
419+
- **Username**: **azureuser**
420+
- **SSH public key source**: Generate new key pair
421+
- **Key pair name**: **VM-Onprem_key**
422+
1. For **Public inbound ports**, select **None**.
429423
1. Select **Next: Disks**.
430424
1. Accept the defaults and select **Next: Networking**.
431425
1. For the virtual network, select **VNet-Onprem**. The subnet is **SN-Corp**.
432426
1. Select **Next: Management**.
433427
1. Select **Next: Monitoring**.
434428
1. For **Boot diagnostics**, select **Disable**.
435429
1. Select **Review+Create**, review the settings on the summary page, and then select **Create**.
430+
1. On the **Generate new key pair** dialog, select **Download private key and create resource**. Save the key file as **VM-Onprem_key.pem**.
436431

437432
[!INCLUDE [ephemeral-ip-note.md](~/reusable-content/ce-skilling/azure/includes/ephemeral-ip-note.md)]
438433

439-
## Test the firewall
434+
## Deploy Azure Bastion
440435

441-
1. Note the private IP address for the **VM-Spoke-01** virtual machine.
436+
Now deploy Azure Bastion to provide secure access to the virtual machine.
442437

443-
1. On the Azure portal, connect to the **VM-Onprem** virtual machine.
438+
1. On the Azure portal menu, select **Create a resource**.
439+
1. In the search box, type **Bastion** and select it from the results.
440+
1. Select **Create**.
441+
1. On the **Create a Bastion** page, configure the following settings:
442+
443+
| Setting | Value |
444+
|---------|-------|
445+
| Subscription | Select your subscription |
446+
| Resource group | **RG-fw-hybrid-test** |
447+
| Name | **Hub-Bastion** |
448+
| Region | Same location as other resources |
449+
| Tier | **Developer** |
450+
| Virtual network | **VNet-Hub** |
451+
| Subnet | Select **Manage subnet configuration** |
452+
453+
1. In the **Subnets** page, select **+ Subnet**.
454+
1. Configure the new subnet:
455+
- **Name**: **AzureBastionSubnet** (this name is required)
456+
- **Subnet address range**: **10.5.3.0/26**
457+
1. Select **Save** and close the subnets page.
458+
1. Select **Review + create**.
459+
1. After validation passes, select **Create**.
444460

445-
1. Open a web browser on **VM-Onprem**, and browse to `http://<VM-Spoke-01 private IP>`.
461+
## Test the firewall
446462

447-
The **VM-Spoke-01** webpage should open.
463+
1. Note the private IP address for the **VM-Spoke-01** virtual machine.
448464

449-
![Screenshot that shows the webpage for the spoke virtual machine.](media/tutorial-hybrid-portal/VM-Spoke-01-web.png)
465+
1. On the Azure portal, connect to the **VM-Onprem** virtual machine using Azure Bastion:
466+
- Navigate to the **VM-Onprem** virtual machine
467+
- Select **Connect** > **Connect via Bastion**
468+
- Select **Use SSH Private Key from Local File**
469+
- For **Username**, type **azureuser**
470+
- Browse to and select the **VM-Onprem_key.pem** file
471+
- Select **Connect**
450472

451-
1. From the **VM-Onprem** virtual machine, open a remote access connection to **VM-Spoke-01** at the private IP address.
473+
1. From the SSH session on **VM-Onprem**, browse to the spoke web server:
452474

453-
Your connection should succeed, and you should be able to sign in.
475+
```bash
476+
curl http://<VM-Spoke-01 private IP>
477+
```
454478

455-
Now that you've verified that the firewall rules are working, you can:
479+
The **VM-Spoke-01** web server should respond with a status.
456480

457-
- Browse to the web server on the spoke virtual network.
458-
- Connect to the server on the spoke virtual network by using RDP.
459481

460482
Next, change the action for the collection of firewall network rules to **Deny**, to verify that the firewall rules work as expected:
461483

0 commit comments

Comments
 (0)