title | description | services | author | ms.service | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|---|
Tutorial: Secure your virtual hub using Azure Firewall Manager |
In this tutorial, you learn how to secure your virtual hub with Azure Firewall Manager using the Azure portal. |
firewall-manager |
vhorne |
firewall-manager |
tutorial |
01/26/2022 |
victorh |
Using Azure Firewall Manager, you can create secured virtual hubs to secure your cloud network traffic destined to private IP addresses, Azure PaaS, and the Internet. Traffic routing to the firewall is automated, so there's no need to create user-defined routes (UDRs).
Firewall Manager also supports a hub virtual network architecture. For a comparison of the secured virtual hub and hub virtual network architecture types, see What are the Azure Firewall Manager architecture options?
In this tutorial, you learn how to:
[!div class="checklist"]
- Create the spoke virtual network
- Create a secured virtual hub
- Connect the hub and spoke virtual networks
- Route traffic to your hub
- Deploy the servers
- Create a firewall policy and secure your hub
- Test the firewall
If you don't have an Azure subscription, create a free account before you begin.
First, create spoke virtual networks where you can place your servers.
The two virtual networks will each have a workload server in them and will be protected by the firewall.
- From the Azure portal home page, select Create a resource.
- Search for Virtual network, and select Create.
- For Subscription, select your subscription.
- For Resource group, select Create new, and type fw-manager-rg for the name and select OK.
- For Name, type Spoke-01.
- For Region, select (US) East US.
- Select Next: IP Addresses.
- For Address space, type 10.0.0.0/16.
- Select Add subnet.
- For Subnet name, type Workload-01-SN.
- For Subnet address range, type 10.0.1.0/24.
- Select Add.
- Select Review + create.
- Select Create.
Repeat this procedure to create another similar virtual network:
Name: Spoke-02
Address space: 10.1.0.0/16
Subnet name: Workload-02-SN
Subnet address range: 10.1.1.0/24
Create your secured virtual hub using Firewall Manager.
-
From the Azure portal home page, select All services.
-
In the search box, type Firewall Manager and select Firewall Manager.
-
On the Firewall Manager page under Deployments, select Virtual hubs.
-
On the Firewall Manager | Virtual hubs page, select Create new secured virtual hub.
-
For Resource group, select fw-manager-rg.
-
For Region, select East US.
-
For the Secured virtual hub name, type Hub-01.
-
For Hub address space, type 10.2.0.0/16.
-
For the new virtual WAN name, type Vwan-01.
-
Leave the Include VPN gateway to enable Trusted Security Partners check box cleared.
-
Select Next: Azure Firewall.
-
Accept the default Azure Firewall Enabled setting.
-
For Azure Firewall tier, select Standard.
-
Select Next: Trusted Security Partner.
-
Accept the default Trusted Security Partner Disabled setting, and select Next: Review + create.
-
Select Create.
It takes about 30 minutes to deploy.
You can get the firewall public IP address after the deployment completes.
- Open Firewall Manager.
- Select Virtual hubs.
- Select hub-01.
- Select Public IP configuration.
- Note the public IP address to use later.
Now you can peer the hub and spoke virtual networks.
- Select the fw-manager-rg resource group, then select the Vwan-01 virtual WAN.
- Under Connectivity, select Virtual network connections.
- Select Add connection.
- For Connection name, type hub-spoke-01.
- For Hubs, select Hub-01.
- For Resource group, select fw-manager-rg.
- For Virtual network, select Spoke-01.
- Select Create.
Repeat to connect the Spoke-02 virtual network: connection name - hub-spoke-02
-
On the Azure portal, select Create a resource.
-
Select Windows Server 2019 Datacenter in the Popular list.
-
Enter these values for the virtual machine:
Setting Value Resource group fw-manager-rg Virtual machine name Srv-workload-01 Region (US) East US) Administrator user name type a user name Password type a password -
Under Inbound port rules, for Public inbound ports, select None.
-
Accept the other defaults and select Next: Disks.
-
Accept the disk defaults and select Next: Networking.
-
Select Spoke-01 for the virtual network and select Workload-01-SN for the subnet.
-
For Public IP, select None.
-
Accept the other defaults and select Next: Management.
-
Select Disable to disable boot diagnostics. Accept the other defaults and select Review + create.
-
Review the settings on the summary page, and then select Create.
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.
Setting | Value |
---|---|
Virtual network | Spoke-02 |
Subnet | Workload-02-SN |
After the servers are deployed, select a server resource, and in Networking note the private IP address for each server.
A firewall policy defines collections of rules to direct traffic on one or more Secured virtual hubs. You'll create your firewall policy and then secure your hub.
- From Firewall Manager, select Azure Firewall policies.
- Select Create Azure Firewall Policy.
- For Resource group, select fw-manager-rg.
- Under Policy details, for the Name type Policy-01 and for Region select East US.
- For Policy tier, select Standard.
- Select Next: DNS Settings.
- Select Next: TLS Inspection.
- Select Next : Rules.
- On the Rules tab, select Add a rule collection.
- On the Add a rule collection page, type App-RC-01 for the Name.
- For Rule collection type, select Application.
- For Priority, type 100.
- Ensure Rule collection action is Allow.
- For the rule Name type Allow-msft.
- For the Source type, select IP address.
- For Source, type *.
- For Protocol, type http,https.
- Ensure Destination type is FQDN.
- For Destination, type *.microsoft.com.
- Select Add.
Add a DNAT rule so you can connect a remote desktop to the Srv-Workload-01 virtual machine.
- Select Add/Rule collection.
- For Name, type dnat-rdp.
- For Rule collection type, select DNAT.
- For Priority, type 100.
- For the rule Name type Allow-rdp.
- For the Source type, select IP address.
- For Source, type *.
- For Protocol, select TCP.
- For Destination Ports, type 3389.
- For Destination Type, select IP Address.
- For Destination, type the firewall public IP address that you noted previously.
- For Translated address, type the private IP address for Srv-Workload-01 that you noted previously.
- For Translated port, type 3389.
- Select Add.
Add a network rule so you can connect a remote desktop from Srv-Workload-01 to Srv-Workload-02.
- Select Add a rule collection.
- For Name, type vnet-rdp.
- For Rule collection type, select Network.
- For Priority, type 100.
- For Rule collection action, select Allow.
- For the rule Name type Allow-vnet.
- For the Source type, select IP address.
- For Source, type *.
- For Protocol, select TCP.
- For Destination Ports, type 3389.
- For Destination Type, select IP Address.
- For Destination, type the Srv-Workload-02 private IP address that you noted previously.
- Select Add.
- Select Review + create.
- Select Create.
Associate the firewall policy with the hub.
- From Firewall Manager, select Azure Firewall Policies.
- Select the check box for Policy-01.
- Select Manage associations, Associate hubs.
- Select hub-01.
- Select Add.
Now you must ensure that network traffic gets routed through your firewall.
-
From Firewall Manager, select Virtual hubs.
-
Select Hub-01.
-
Under Settings, select Security configuration.
-
Under Internet traffic, select Azure Firewall.
-
Under Private traffic, select Send via Azure Firewall.
-
Select Save.
-
Select OK on the Warning dialog.
It takes a few minutes to update the route tables.
-
Verify that the two connections show Azure Firewall secures both Internet and private traffic.
To test the firewall rules, you'll connect a remote desktop using the firewall public IP address, which is NATed to Srv-Workload-01. From there you'll use a browser to test the application rule and connect a remote desktop to Srv-Workload-02 to test the network rule.
Now, test the firewall rules to confirm that it works as expected.
-
Connect a remote desktop to firewall public IP address, and sign in.
-
Open Internet Explorer and browse to
https://www.microsoft.com
. -
Select OK > Close on the Internet Explorer security alerts.
You should see the Microsoft home page.
-
Browse to
https://www.google.com
.You should be blocked by the firewall.
So now you've verified that the firewall application rule is working:
- You can browse to the one allowed FQDN, but not to any others.
Now test the network rule.
-
From Srv-Workload-01, open a remote desktop to the Srv-Workload-02 private IP address.
A remote desktop should connect to Srv-Workload-02.
So now you've verified that the firewall network rule is working:
- You can connect a remote desktop to a server located in another virtual network.
When you’re done testing your firewall resources, delete the fw-manager-rg resource group to delete all firewall-related resources.
[!div class="nextstepaction"] Learn about trusted security partners