Skip to content

Commit e9e46f0

Browse files
authored
Merge pull request #252899 from vhorne/fwm-tutorial
Fwm-tutorial
2 parents 4628491 + dc2feac commit e9e46f0

File tree

3 files changed

+79
-61
lines changed

3 files changed

+79
-61
lines changed
82.3 KB
Loading
-51.4 KB
Loading

articles/firewall-manager/secure-hybrid-network.md

Lines changed: 79 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: vhorne
66
ms.service: firewall-manager
77
ms.custom: ignite-2022
88
ms.topic: tutorial
9-
ms.date: 06/15/2022
9+
ms.date: 09/26/2023
1010
ms.author: victorh
1111
---
1212

@@ -22,7 +22,7 @@ For this tutorial, you create three virtual networks:
2222

2323
- **VNet-Hub** - the firewall is in this virtual network.
2424
- **VNet-Spoke** - the spoke virtual network represents the workload located on Azure.
25-
- **VNet-Onprem** - The on-premises virtual network represents an on-premises network. In an actual deployment, it can be connected by either a VPN or ExpressRoute connection. For simplicity, this tutorial uses a VPN gateway connection, and an Azure-located virtual network is used to represent an on-premises network.
25+
- **VNet-Onprem** - The on-premises virtual network represents an on-premises network. In an actual deployment, it can be connected using either a VPN or ExpressRoute connection. For simplicity, this tutorial uses a VPN gateway connection, and an Azure-located virtual network is used to represent an on-premises network.
2626

2727
![Hybrid network](media/tutorial-hybrid-portal/hybrid-network-firewall.png)
2828

@@ -45,7 +45,7 @@ A hybrid network uses the hub-and-spoke architecture model to route traffic betw
4545

4646
- Set **AllowGatewayTransit** when peering VNet-Hub to VNet-Spoke. In a hub-and-spoke network architecture, a gateway transit allows the spoke virtual networks to share the VPN gateway in the hub, instead of deploying VPN gateways in every spoke virtual network.
4747

48-
Additionally, routes to the gateway-connected virtual networks or on-premises networks will automatically propagate to the routing tables for the peered virtual networks using the gateway transit. For more information, see [Configure VPN gateway transit for virtual network peering](../vpn-gateway/vpn-gateway-peering-gateway-transit.md).
48+
Additionally, routes to the gateway-connected virtual networks or on-premises networks are automatically propagated to the routing tables for the peered virtual networks using the gateway transit. For more information, see [Configure VPN gateway transit for virtual network peering](../vpn-gateway/vpn-gateway-peering-gateway-transit.md).
4949

5050
- Set **UseRemoteGateways** when you peer VNet-Spoke to VNet-Hub. If **UseRemoteGateways** is set and **AllowGatewayTransit** on remote peering is also set, the spoke virtual network uses gateways of the remote virtual network for transit.
5151
- To route the spoke subnet traffic through the hub firewall, you need a User Defined route (UDR) that points to the firewall with the **Virtual network gateway route propagation** setting disabled. This option prevents route distribution to the spoke subnets. This prevents learned routes from conflicting with your UDR.
@@ -67,9 +67,9 @@ If you don't have an Azure subscription, create a [free account](https://azure.m
6767

6868
1. Sign in to the [Azure portal](https://portal.azure.com).
6969
2. In the Azure portal search bar, type **Firewall Manager** and press **Enter**.
70-
3. On the Azure Firewall Manager page, select **View Azure firewall policies**.
70+
3. On the Azure Firewall Manager page, under **Security**, select **Azure firewall policies**.
7171

72-
![Firewall policy](media/tutorial-hybrid-portal/firewall-manager-policy.png)
72+
:::image type="content" source="media/secure-hybrid-network/firewall-manager-policy.png" alt-text="Screenshot showing Firewall Manager main page."lightbox="media/secure-hybrid-network/firewall-manager-policy.png":::
7373

7474
1. Select **Create Azure Firewall Policy**.
7575
1. Select your subscription, and for Resource group, select **Create new** and create a resource group named **FW-Hybrid-Test**.
@@ -114,16 +114,19 @@ If you don't have an Azure subscription, create a [free account](https://azure.m
114114
1. For **Resource group**, select **FW-Hybrid-Test**.
115115
1. For **Name**, type **VNet-hub**.
116116
1. For **Region**, select **East US**.
117-
1. Select **Next : IP Addresses**.
117+
1. Select **Next**.
118+
1. On the **Security**, select **Next**.
118119

119120
1. For **IPv4 address space**, type **10.5.0.0/16**.
120-
1. Under **Subnet name**, select **default**.
121-
1. Change the **Subnet name** to **AzureFirewallSubnet**. The firewall is in this subnet, and the subnet name **must** be AzureFirewallSubnet.
122-
1. For **Subnet address range**, type **10.5.0.0/26**.
121+
1. Under **Subnets**, select **default**.
122+
1. For Subnet template, select **Azure Firewall**.
123+
1. For **Starting address**, type **10.5.0.0/26**.
123124
1. Accept the other default settings, and then select **Save**.
124125
1. Select **Review + create**.
125126
1. Select **Create**.
126127

128+
Add another subnet named **GatewaySubnet** with an address space of 10.5.1.0/27. This subnet is used for the VPN gateway.
129+
127130
## Create the spoke virtual network
128131

129132
1. From the Azure portal home page, select **Create a resource**.
@@ -133,12 +136,13 @@ If you don't have an Azure subscription, create a [free account](https://azure.m
133136
1. For **Resource group**, select **FW-Hybrid-Test**.
134137
1. For **Name**, type **VNet-Spoke**.
135138
1. For **Region**, select **East US**.
139+
1. Select **Next**.
140+
1. On the **Security** page, select **Next**.
136141
1. Select **Next : IP Addresses**.
137-
138142
1. For **IPv4 address space**, type **10.6.0.0/16**.
139-
1. Under **Subnet name**, select **default**.
140-
1. Change the **Subnet name** to **SN-Workload**.
141-
1. For **Subnet address range**, type **10.6.0.0/24**.
143+
1. Under **Subnets**, select **default**.
144+
1. Change the **Name** to **SN-Workload**.
145+
1. For **Starting address**, type **10.6.0.0/24**.
142146
1. Accept the other default settings, and then select **Save**.
143147
1. Select **Review + create**.
144148
1. Select **Create**.
@@ -151,19 +155,20 @@ If you don't have an Azure subscription, create a [free account](https://azure.m
151155
1. Select **Create**.
152156
1. For **Subscription**, select your subscription.
153157
1. For **Resource group**, select **FW-Hybrid-Test**.
154-
1. For **Name**, type **VNet-OnPrem**.
158+
1. For **Virtual network name**, type **VNet-OnPrem**.
155159
1. For **Region**, select **East US**.
156-
1. Select **Next : IP Addresses**.
160+
1. Select **Next**.
161+
1. On the **Security** page, select **Next**.
157162

158163
1. For **IPv4 address space**, type **192.168.0.0/16**.
159-
1. Under **Subnet name**, select **default**.
160-
1. Change the **Subnet name** to **SN-Corp**.
161-
1. For **Subnet address range**, type **192.168.1.0/24**.
164+
1. Under **Subnets**, select **default**.
165+
1. Change the **Name** to **SN-Corp**.
166+
1. For **Starting address**, type **192.168.1.0/24**.
162167
1. Accept the other default settings, and then select **Save**.
163-
2. Select **Add Subnet**.
164-
3. For **Subnet name**, type **GatewaySubnet**.
165-
4. For **Subnet address range** type **192.168.2.0/24**.
166-
5. Select **Add**.
168+
2. Select **Add a subnet**.
169+
1. For **Subnet template**, select **Virtual Network Gateway**.
170+
1. For **Starting address** type **192.168.2.0/27**.
171+
1. Select **Add**.
167172
1. Select **Review + create**.
168173
1. Select **Create**.
169174

@@ -177,17 +182,18 @@ When security policies are associated with a hub, it's referred to as a *hub vir
177182
Convert the **VNet-Hub** virtual network into a *hub virtual network* and secure it with Azure Firewall.
178183

179184
1. In the Azure portal search bar, type **Firewall Manager** and press **Enter**.
180-
3. On the Azure Firewall Manager page, under **Add security to virtual networks**, select **View hub virtual networks**.
185+
1. In the right pane, select **Overview**.
186+
1. On the Azure Firewall Manager page, under **Add security to virtual networks**, select **View hub virtual networks**.
181187
1. Under **Virtual Networks**, select the check box for **VNet-hub**.
182188
1. Select **Manage Security**, and then select **Deploy a Firewall with Firewall Policy**.
183-
1. On the **Convert virtual networks** page, under **Firewall Policy**, select the check box for **Pol-Net01**.
189+
1. On the **Convert virtual networks** page, under **Azure Firewall tier**, select **Premium**. Under **Firewall Policy**, select the check box for **Pol-Net01**.
184190
1. Select **Next : Review + confirm**
185191
1. Review the details and then select **Confirm**.
186192

187193

188194
This takes a few minutes to deploy.
189195
7. After deployment completes, go to the **FW-Hybrid-Test** resource group, and select the firewall.
190-
9. Note the **Firewall private IP** address on the **Overview** page. You'll use it later when you create the default route.
196+
9. Note the **Firewall private IP** address on the **Overview** page. You use it later when you create the default route.
191197

192198
## Create and connect the VPN gateways
193199

@@ -204,11 +210,13 @@ Now create the VPN gateway for the hub virtual network. Network-to-network confi
204210
5. For **Region**, select **(US) East US**.
205211
6. For **Gateway type**, select **VPN**.
206212
7. For **VPN type**, select **Route-based**.
207-
8. For **SKU**, select **Basic**.
208-
9. For **Virtual network**, select **VNet-hub**.
209-
10. For **Public IP address**, select **Create new**, and type **VNet-hub-GW-pip** for the name.
210-
11. Accept the remaining defaults and then select **Review + create**.
211-
12. Review the configuration, then select **Create**.
213+
8. For **SKU**, select **VpnGw2**.
214+
1. For **Generation**, select **Generation2**.
215+
1. For **Virtual network**, select **VNet-hub**.
216+
1. For **Public IP address**, select **Create new**, and type **VNet-hub-GW-pip** for the name.
217+
1. For **Enable active-active mode**, select **Disabled**.
218+
1. Accept the remaining defaults and then select **Review + create**.
219+
1. Review the configuration, then select **Create**.
212220

213221
### Create a VPN gateway for the on-premises virtual network
214222

@@ -221,26 +229,31 @@ Now create the VPN gateway for the on-premises virtual network. Network-to-netwo
221229
5. For **Region**, select **(US) East US**.
222230
6. For **Gateway type**, select **VPN**.
223231
7. For **VPN type**, select **Route-based**.
224-
8. For **SKU**, select **Basic**.
225-
9. For **Virtual network**, select **VNet-Onprem**.
226-
10. For **Public IP address**, select **Create new**, and type **VNet-Onprem-GW-pip** for the name.
227-
11. Accept the remaining defaults and then select **Review + create**.
228-
12. Review the configuration, then select **Create**.
232+
8. For **SKU**, select **VpnGw2**.
233+
1. For **Generation**, select **Generation2**.
234+
1. For **Virtual network**, select **VNet-Onprem**.
235+
1. For **Public IP address**, select **Create new**, and type **VNet-Onprem-GW-pip** for the name.
236+
1. For **Enable active-active mode**, select **Disabled**.
237+
1. Accept the remaining defaults and then select **Review + create**.
238+
1. Review the configuration, then select **Create**.
229239

230240
### Create the VPN connections
231241

232242
Now you can create the VPN connections between the hub and on-premises gateways.
233243

234-
In this step, you create the connection from the hub virtual network to the on-premises virtual network. You'll see a shared key referenced in the examples. You can use your own values for the shared key. The important thing is that the shared key must match for both connections. It takes some time to create the connection.
244+
In this step, you create the connection from the hub virtual network to the on-premises virtual network. A shared key is referenced in the examples. You can use your own values for the shared key. The important thing is that the shared key must match for both connections. It takes some time to create the connection.
235245

236246
1. Open the **FW-Hybrid-Test** resource group and select the **GW-hub** gateway.
237247
2. Select **Connections** in the left column.
238248
3. Select **Add**.
239249
4. For the connection name, type **Hub-to-Onprem**.
240250
5. Select **VNet-to-VNet** for **Connection type**.
241-
6. For the **Second virtual network gateway**, select **GW-Onprem**.
242-
7. For **Shared key (PSK)**, type **AzureA1b2C3**.
243-
8. Select **OK**.
251+
1. Select **Next : Settings**.
252+
1. For the **First virtual network gateway**, select **GW-hub**.
253+
1. For the **Second virtual network gateway**, select **GW-Onprem**.
254+
1. For **Shared key (PSK)**, type **AzureA1b2C3**.
255+
1. Select **Review + create**.
256+
1. Select **Create**.
244257

245258
Create the on-premises to hub virtual network connection. This step is similar to the previous one, except you create the connection from VNet-Onprem to VNet-hub. Make sure the shared keys match. The connection will be established after a few minutes.
246259

@@ -258,7 +271,7 @@ Create the on-premises to hub virtual network connection. This step is similar t
258271

259272
After about five minutes or so, the status of both connections should be **Connected**.
260273

261-
![Gateway connections](media/secure-hybrid-network/gateway-connections.png)
274+
:::image type="content" source="media/secure-hybrid-network/gateway-connections.png" alt-text="Screenshot showing the vpn gateway connections.":::
262275

263276
## Peer the hub and spoke virtual networks
264277

@@ -273,9 +286,9 @@ Now peer the hub and spoke virtual networks.
273286
|Setting name |Value |
274287
|---------|---------|
275288
|Peering link name| HubtoSpoke|
276-
|Traffic to remote virtual network| Allow (default) |
277-
|Traffic forwarded from remote virtual network | Allow (default) |
278-
|Virtual network gateway or route server | Use this virtual network's gateway |
289+
|Allow traffic to remote virtual network| selected |
290+
|Allow traffic forwarded from the remote virtual network (allow gateway transit) | selected |
291+
|Use remote Virtual network gateway or route server | not selected |
279292

280293
5. Under **Remote virtual network**:
281294

@@ -285,13 +298,13 @@ Now peer the hub and spoke virtual networks.
285298
|Virtual network deployment model| Resource Manager|
286299
|Subscription|\<your subscription\>|
287300
|Virtual network| VNet-Spoke
288-
|Traffic to remote virtual network | Allow (default) |
289-
|Traffic forwarded from remote virtual network | Allow (default) |
290-
|Virtual network gateway | Use the remote virtual network's gateway |
301+
|Allow traffic to current virtual network | selected |
302+
|Allow traffic forwarded from current virtual network (allow gateway transit) | selected |
303+
|Use current virtual network gateway or route server | selected |
291304

292305
5. Select **Add**.
293306

294-
:::image type="content" source="media/secure-hybrid-network/firewall-peering.png" alt-text="Vnet peering":::
307+
:::image type="content" source="media/secure-hybrid-network/firewall-peering.png" alt-text="Screenshot showing Vnet peering.":::
295308

296309
## Create the routes
297310

@@ -313,10 +326,11 @@ Next, create a couple routes:
313326
1. Select **Routes** in the left column.
314327
1. Select **Add**.
315328
1. For the route name, type **ToSpoke**.
316-
1. For the address prefix, type **10.6.0.0/16**.
329+
1. For **Destination type**, select **IP addresses**.
330+
1. For **Destination IP addresses/CIDR ranges**, type **10.6.0.0/16**.
317331
1. For next hop type, select **Virtual appliance**.
318332
1. For next hop address, type the firewall's private IP address that you noted earlier.
319-
1. Select **OK**.
333+
1. Select **Add**.
320334

321335
Now associate the route to the subnet.
322336

@@ -342,10 +356,11 @@ Now create the default route from the spoke subnet.
342356
1. Select **Routes** in the left column.
343357
1. Select **Add**.
344358
1. For the route name, type **ToHub**.
345-
1. For the address prefix, type **0.0.0.0/0**.
359+
1. For **Destination type**, select **IP addresses**
360+
1. For **Destination IP addresses/CIDR ranges**, type **0.0.0.0/0**.
346361
1. For next hop type, select **Virtual appliance**.
347362
1. For next hop address, type the firewall's private IP address that you noted earlier.
348-
1. Select **OK**.
363+
1. Select **Add**.
349364

350365
Now associate the route to the subnet.
351366

@@ -364,19 +379,20 @@ Now create the spoke workload and on-premises virtual machines, and place them i
364379
Create a virtual machine in the spoke virtual network, running IIS, with no public IP address.
365380

366381
1. From the Azure portal home page, select **Create a resource**.
367-
2. Under **Popular**, select **Windows Server 2016 Datacenter**.
382+
2. Under **Popular Marketplace products**, select **Windows Server 2019 Datacenter**.
368383
3. Enter these values for the virtual machine:
369384
- **Resource group** - Select **FW-Hybrid-Test**
370385
- **Virtual machine name**: *VM-Spoke-01*
371386
- **Region** - *(US) East US*
372387
- **User name**: type a user name
373388
- **Password**: type a password
374389

375-
4. Select **Next:Disks**.
376-
5. Accept the defaults and select **Next: Networking**.
377-
6. Select **VNet-Spoke** for the virtual network and the subnet is **SN-Workload**.
378-
8. For **Public inbound ports**, select **Allow selected ports**, and then select **HTTP (80)**, and **RDP (3389)**
390+
4. For **Public inbound ports**, select **Allow selected ports**, and then select **HTTP (80)**, and **RDP (3389)**
391+
1. Select **Next:Disks**.
392+
1. Accept the defaults and select **Next: Networking**.
393+
1. Select **VNet-Spoke** for the virtual network and the subnet is **SN-Workload**.
379394
1. Select **Next:Management**.
395+
1. Select **Next : Monitoring**.
380396
1. For **Boot diagnostics**, Select **Disable**.
381397
1. Select **Review + Create**, review the settings on the summary page, and then select **Create**.
382398

@@ -402,21 +418,23 @@ Create a virtual machine in the spoke virtual network, running IIS, with no publ
402418
This is a virtual machine that you use to connect using Remote Desktop to the public IP address. From there, you then connect to the on-premises server through the firewall.
403419

404420
1. From the Azure portal home page, select **Create a resource**.
405-
2. Under **Popular**, select **Windows Server 2016 Datacenter**.
421+
2. Under **Popular**, select **Windows Server 2019 Datacenter**.
406422
3. Enter these values for the virtual machine:
407423
- **Resource group** - Select existing, and then select **FW-Hybrid-Test**
408424
- **Virtual machine name** - *VM-Onprem*
409425
- **Region** - *(US) East US*
410426
- **User name**: type a user name
411427
- **Password**: type your password
412428

429+
7. For **Public inbound ports**, select **Allow selected ports**, and then select **RDP (3389)**
413430
4. Select **Next:Disks**.
414431
5. Accept the defaults and select **Next:Networking**.
415432
6. Select **VNet-Onprem** for virtual network and verify the subnet is **SN-Corp**.
416-
7. For **Public inbound ports**, select **Allow selected ports**, and then select **RDP (3389)**
433+
417434
8. Select **Next:Management**.
418-
9. For **Boot diagnostics**, select **Disable**.
419-
10. Select **Review + Create**, review the settings on the summary page, and then select **Create**.
435+
1. Select **Next : Monitoring**.
436+
1. For **Boot diagnostics**, select **Disable**.
437+
1. Select **Review + Create**, review the settings on the summary page, and then select **Create**.
420438

421439
## Test the firewall
422440

@@ -429,7 +447,7 @@ This is a virtual machine that you use to connect using Remote Desktop to the pu
429447
3. Open a web browser on **VM-Onprem**, and browse to http://\<VM-spoke-01 private IP\>.
430448

431449
You should see the **VM-spoke-01** web page:
432-
![VM-Spoke-01 web page](media/secure-hybrid-network/vm-spoke-01-web.png)
450+
:::image type="content" source="media/secure-hybrid-network/vm-spoke-01-web.png" alt-text="Screenshot showing vm-spoke-01 web page.":::
433451

434452
4. From the **VM-Onprem** virtual machine, open a remote desktop to **VM-spoke-01** at the private IP address.
435453

0 commit comments

Comments
 (0)