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
Copy file name to clipboardExpand all lines: articles/firewall/tutorial-hybrid-portal-policy.md
+96-76Lines changed: 96 additions & 76 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ services: firewall
5
5
author: vhorne
6
6
ms.service: azure-firewall
7
7
ms.topic: tutorial
8
-
ms.date: 06/08/2022
8
+
ms.date: 08/05/2024
9
9
ms.author: victorh
10
10
#Customer intent: As an administrator, I want to control network access from an on-premises network to an Azure virtual network.
11
11
---
@@ -20,7 +20,7 @@ For this tutorial, you create three virtual networks:
20
20
21
21
-**VNet-Hub** - the firewall is in this virtual network.
22
22
-**VNet-Spoke** - the spoke virtual network represents the workload located on Azure.
23
-
-**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.
23
+
-**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.
24
24
25
25
:::image type="content" source="media/tutorial-hybrid-ps/hybrid-network-firewall.png" alt-text="Diagram of Firewall in a hybrid network." lightbox="media/tutorial-hybrid-ps/hybrid-network-firewall.png":::
26
26
@@ -43,11 +43,6 @@ If you want to use Azure PowerShell instead to complete this procedure, see [Dep
43
43
44
44
A hybrid network uses the hub-and-spoke architecture model to route traffic between Azure VNets and on-premises networks. The hub-and-spoke architecture has the following requirements:
45
45
46
-
- Set **Use this virtual network's gateway or Route Server** 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.
47
-
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).
49
-
50
-
- Set **Use the remote virtual network's gateways or Route Server** when you peer VNet-Spoke to VNet-Hub. If **Use the remote virtual network's gateways or Route Server** is set and **Use this virtual network's gateway or Route Server** on remote peering is also set, the spoke virtual network uses gateways of the remote virtual network for transit.
51
46
- To route the spoke subnet traffic through the hub firewall, you can use a User Defined route (UDR) that points to the firewall with the **Virtual network gateway route propagation** option disabled. The **Virtual network gateway route propagation** disabled option prevents route distribution to the spoke subnets. This prevents learned routes from conflicting with your UDR. If you want to keep **Virtual network gateway route propagation** enabled, make sure to define specific routes to the firewall to override those that are published from on-premises over BGP.
52
47
- Configure a UDR on the hub gateway subnet that points to the firewall IP address as the next hop to the spoke networks. No UDR is required on the Azure Firewall subnet, as it learns routes from BGP.
53
48
@@ -75,7 +70,7 @@ First, create the resource group to contain the resources for this tutorial:
75
70
3. Select **Review + Create**.
76
71
4. Select **Create**.
77
72
78
-
Now, create the VNet:
73
+
Now, create the virtual network:
79
74
80
75
> [!NOTE]
81
76
> The size of the AzureFirewallSubnet subnet is /26. For more information about the subnet size, see [Azure Firewall FAQ](firewall-faq.yml#why-does-azure-firewall-need-a--26-subnet-size).
@@ -85,15 +80,24 @@ Now, create the VNet:
85
80
1. Select **Create**.
86
81
1. For **Resource group**, select **FW-Hybrid-Test**.
87
82
1. For **Name**, type **VNet-hub**.
88
-
1.Select **Next: IP Addresses**.
89
-
1. For **IPv4 Address space**, delete the default address and type **10.5.0.0/16**.
90
-
1. Under **Subnet name**, select **Add subnet**.
91
-
1. For **Subnet name** type**AzureFirewallSubnet**. The firewall will be in this subnet, and the subnet name **must** be AzureFirewallSubnet.
92
-
1. For **Subnet address range**, type **10.5.0.0/26**.
93
-
1. Select **Add**.
83
+
1.On the **Security** tab, select **Next**.
84
+
1. For **IPv4 Address space**, type **10.5.0.0/16**.
85
+
1. Under **Subnets**, select **default**.
86
+
1. For **Subnet purpose**, select**Azure Firewall**.
87
+
1. For **Starting address**, type **10.5.0.0/26**.
88
+
1. Select **Save**.
94
89
1. Select **Review + create**.
95
90
1. Select **Create**.
96
91
92
+
Now create a second subnet for the gateway.
93
+
94
+
1. On the **VNet-hub** page, select **Subnets**.
95
+
2. Select **+Subnet**.
96
+
1. For **Subnet purpose**, select **Virtual Network Gateway**.
97
+
1. For **Starting address** type **10.5.2.0/26**.
98
+
1. Select **Add**.
99
+
100
+
97
101
## Create the spoke virtual network
98
102
99
103
1. From the Azure portal home page, select **Create a resource**.
@@ -102,12 +106,13 @@ Now, create the VNet:
102
106
1. For **Resource group**, select **FW-Hybrid-Test**.
103
107
1. For **Name**, type **VNet-Spoke**.
104
108
1. For **Region**, select **(US) East US**.
105
-
1. Select **Next: IP Addresses**.
106
-
1. For **IPv4 address space**, delete the default address and type **10.6.0.0/16**.
107
-
1. Under **Subnet name**, select **Add subnet**.
108
-
1. For **Subnet name** type **SN-Workload**.
109
-
1. For **Subnet address range**, type **10.6.0.0/24**.
110
-
1. Select **Add**.
109
+
1. Select **Next**.
110
+
1. On the **Security** tab, select **Next**.
111
+
1. For **IPv4 address space**, type **10.6.0.0/16**.
112
+
1. Under **Subnets**, select **default**.
113
+
1. For **Name** type **SN-Workload**.
114
+
1. For **Starting address**, type **10.6.0.0/24**.
115
+
1. Select **Save**.
111
116
1. Select **Review + create**.
112
117
1. Select **Create**.
113
118
@@ -118,22 +123,23 @@ Now, create the VNet:
118
123
7. For **Resource group**, select **FW-Hybrid-Test**.
119
124
1. For **Name**, type **VNet-OnPrem**.
120
125
2. For **Region**, select **(US) East US**.
121
-
3. Select **Next : IP Addresses**
122
-
4. For **IPv4 address space**, delete the default address and type **192.168.0.0/16**.
123
-
5. Under **Subnet name**, select **Add subnet**.
124
-
7. For **Subnet name** type **SN-Corp**.
125
-
8. For **Subnet address range**, type **192.168.1.0/24**.
126
-
9. Select **Add**.
127
-
10. Select **Review + create**.
128
-
11. Select **Create**.
126
+
3. Select **Next**.
127
+
1. On the **Security** tab, select **Next**.
128
+
1. For **IPv4 address space**, type **192.168.0.0/16**.
129
+
1. Under **Subnets**, select **default**.
130
+
1. For **Name** type **SN-Corp**.
131
+
1. For **Starting address**, type **192.168.1.0/24**.
132
+
1. Select **Save**.
133
+
1. Select **Review + create**.
134
+
1. Select **Create**.
129
135
130
136
Now create a second subnet for the gateway.
131
137
132
138
1. On the **VNet-Onprem** page, select **Subnets**.
133
139
2. Select **+Subnet**.
134
-
3. For **Name**, type**GatewaySubnet**.
135
-
4. For **Subnet address range** type **192.168.2.0/24**.
136
-
5. Select **Save**.
140
+
1. For **Subnet purpose**, select**Virtual Network Gateway**.
141
+
1. For **Starting address** type **192.168.2.0/24**.
142
+
1. Select **Add**.
137
143
138
144
## Configure and deploy the firewall
139
145
@@ -156,8 +162,9 @@ Now deploy the firewall into the firewall hub virtual network.
156
162
|Public IP address |Add new: <br>**fw-pip**|
157
163
158
164
159
-
5. Select **Review + create**.
160
-
6. Review the summary, and then select **Create** to create the firewall.
165
+
5. Select **Next : Tags**.
166
+
1. Select **Next: Review + create**.
167
+
1. Review the summary, and then select **Create** to create the firewall.
161
168
162
169
This takes a few minutes to deploy.
163
170
7. After deployment completes, go to the **FW-Hybrid-Test** resource group, and select the **AzFW01** firewall.
@@ -168,7 +175,7 @@ Now deploy the firewall into the firewall hub virtual network.
168
175
First, add a network rule to allow web traffic.
169
176
170
177
1. From the **FW-Hybrid-Test** resource group, select the **hybrid-test-pol** Firewall Policy.
171
-
2.Select**Network rules**.
178
+
2.Under **Settings**, select**Network rules**.
172
179
3. Select **Add add a rule collection**.
173
180
4. For **Name**, type **RCNet01**.
174
181
5. For **Priority**, type **100**.
@@ -208,12 +215,12 @@ Now create the VPN gateway for the hub virtual network. Network-to-network confi
208
215
4. For **Name**, type **GW-hub**.
209
216
5. For **Region**, select the same region that you used previously.
210
217
6. For **Gateway type**, select **VPN**.
211
-
7. For **VPN type**, select **Route-based**.
212
-
8. For **SKU**, select **Basic**.
218
+
8. For **SKU**, select **VpnGw1**.
213
219
9. For **Virtual network**, select **VNet-hub**.
214
220
10. For **Public IP address**, select **Create new**, and type **VNet-hub-GW-pip** for the name.
215
-
11. Accept the remaining defaults and then select **Review + create**.
216
-
12. Review the configuration, then select **Create**.
221
+
1. For **Second Public IP address**, select **Create new**, and type **VNet-hub-GW-pip2** for the name.
222
+
1. Accept the remaining defaults and then select **Review + create**.
223
+
1. Review the configuration, then select **Create**.
217
224
218
225
### Create a VPN gateway for the on-premises virtual network
219
226
@@ -225,27 +232,30 @@ Now create the VPN gateway for the on-premises virtual network. Network-to-netwo
225
232
4. For **Name**, type **GW-Onprem**.
226
233
5. For **Region**, select the same region that you used previously.
227
234
6. For **Gateway type**, select **VPN**.
228
-
7. For **VPN type**, select **Route-based**.
229
-
8. For **SKU**, select **Basic**.
235
+
8. For **SKU**, select **VpnGw1**.
230
236
9. For **Virtual network**, select **VNet-Onprem**.
231
237
10. For **Public IP address**, select **Create new**, and type **VNet-Onprem-GW-pip** for the name.
232
-
11. Accept the remaining defaults and then select **Review + create**.
233
-
12. Review the configuration, then select **Create**.
238
+
1. For **Second Public IP address**, select **Create new**, and type **VNet-Onprem-GW-pip2** for the name.
239
+
1. Accept the remaining defaults and then select **Review + create**.
240
+
1. Review the configuration, then select **Create**.
234
241
235
242
### Create the VPN connections
236
243
237
244
Now you can create the VPN connections between the hub and on-premises gateways.
238
245
239
-
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. Creating a connection can take a short while to complete.
246
+
In this step, you create the connection from the hub virtual network to the on-premises virtual network. A shared key is used 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. Creating a connection can take a short while to complete.
240
247
241
248
1. Open the **FW-Hybrid-Test** resource group and select the **GW-hub** gateway.
242
-
2.Select**Connections** in the left column.
249
+
2.Under **Settings**, select**Connections** in the left column.
243
250
3. Select **Add**.
244
251
4. For the connection name, type **Hub-to-Onprem**.
245
252
5. Select **VNet-to-VNet** for **Connection type**.
246
-
6. For the **Second virtual network gateway**, select **GW-Onprem**.
247
-
7. For **Shared key (PSK)**, type **AzureA1b2C3**.
248
-
8. Select **OK**.
253
+
1. Select **Next : Settings**.
254
+
1. For the **First virtual network gateway**, select **GW-hub**.
255
+
1. For the **Second virtual network gateway**, select **GW-Onprem**.
256
+
1. For **Shared key (PSK)**, type **AzureA1b2C3**.
257
+
1. Select **Review + create**.
258
+
1. Select **Create**.
249
259
250
260
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.
251
261
@@ -254,9 +264,12 @@ Create the on-premises to hub virtual network connection. This step is similar t
254
264
3. Select **Add**.
255
265
4. For the connection name, type **Onprem-to-Hub**.
256
266
5. Select **VNet-to-VNet** for **Connection type**.
257
-
6. For the **Second virtual network gateway**, select **GW-hub**.
258
-
7. For **Shared key (PSK)**, type **AzureA1b2C3**.
259
-
8. Select **OK**.
267
+
1. Select **Next : Settings**.
268
+
1. For the **First virtual network gateway**, select **GW-Onprem**.
269
+
1. For the **Second virtual network gateway**, select **GW-hub**.
270
+
1. For **Shared key (PSK)**, type **AzureA1b2C3**.
271
+
1. Select **Review + create**.
272
+
1. Select **Create**.
260
273
261
274
262
275
#### Verify the connection
@@ -272,31 +285,36 @@ Now peer the hub and spoke virtual networks.
272
285
1. Open the **FW-Hybrid-Test** resource group and select the **VNet-hub** virtual network.
273
286
2. In the left column, select **Peerings**.
274
287
3. Select **Add**.
275
-
4. Under **This virtual network**:
276
-
277
-
278
-
|Setting name |Value |
279
-
|---------|---------|
280
-
|Peering link name| HubtoSpoke|
281
-
|Traffic to remote virtual network| Allow (default) |
282
-
|Traffic forwarded from remote virtual network | Allow (default) |
283
-
|Virtual network gateway | Use this virtual network's gateway |
0 commit comments