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-firewall-deploy-portal-policy.md
+96-86Lines changed: 96 additions & 86 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: firewall
7
7
ms.topic: tutorial
8
-
ms.date: 08/26/2021
8
+
ms.date: 10/18/2022
9
9
ms.author: victorh
10
10
ms.custom: mvc
11
11
#Customer intent: As an administrator new to this service, I want to control outbound network access from resources located in an Azure subnet.
@@ -24,13 +24,13 @@ Network traffic is subjected to the configured firewall rules when you route you
24
24
25
25
For this tutorial, you create a simplified single VNet with two subnets for easy deployment.
26
26
27
-
For production deployments, a [hub and spoke model](/azure/architecture/reference-architectures/hybrid-networking/hub-spoke) is recommended, where the firewall is in its own VNet. The workload servers are in peered VNets in the same region with one or more subnets.
28
-
29
27
***AzureFirewallSubnet** - the firewall is in this subnet.
30
28
***Workload-SN** - the workload server is in this subnet. This subnet's network traffic goes through the firewall.
For production deployments, a [hub and spoke model](/azure/architecture/reference-architectures/hybrid-networking/hub-spoke) is recommended, where the firewall is in its own VNet. The workload servers are in peered VNets in the same region with one or more subnets.
33
+
34
34
In this tutorial, you learn how to:
35
35
36
36
> [!div class="checklist"]
@@ -57,10 +57,14 @@ First, create a resource group to contain the resources needed to deploy the fir
57
57
The resource group contains all the resources for the tutorial.
58
58
59
59
1. Sign in to the Azure portal at [https://portal.azure.com](https://portal.azure.com).
60
-
2. On the Azure portal menu, select **Resource groups** or search for and select *Resource groups* from any page. Then select **Add**.
61
-
4. For **Subscription**, select your subscription.
62
-
1. For **Resource group name**, enter *Test-FW-RG*.
63
-
1. For **Region**, select a region. All other resources that you create must be in the same region.
60
+
1. On the Azure portal menu, select **Resource groups** or search for and select *Resource groups* from any page, then select **Add**. Enter or select the following values:
61
+
62
+
| Setting | Value |
63
+
| -------- | ------ |
64
+
| Subscription | Select your Azure subscription. |
65
+
| Resource group | Enter *Test-FW-RG*. |
66
+
| Region | Select a region. All other resources that you create must be in the same region. |
67
+
64
68
1. Select **Review + create**.
65
69
1. Select **Create**.
66
70
@@ -74,11 +78,15 @@ This VNet will have two subnets.
74
78
1. On the Azure portal menu or from the **Home** page, select **Create a resource**.
75
79
1. Select **Networking**.
76
80
1. Search for **Virtual network** and select it.
77
-
1. Select **Create**.
78
-
1. For **Subscription**, select your subscription.
79
-
1. For **Resource group**, select **Test-FW-RG**.
80
-
1. For **Name**, type **Test-FW-VN**.
81
-
1. For **Region**, select the same location that you used previously.
81
+
1. Select **Create**, then enter or select the following values:
82
+
83
+
| Setting | Value |
84
+
| -------- | ------ |
85
+
| Subscription | Select your Azure subscription. |
86
+
| Resource group | Select **Test-FW-RG**. |
87
+
| Name | Enter *Test-FW-VN*. |
88
+
| Region | Select the same location that you used previously. |
89
+
82
90
1. Select **Next: IP addresses**.
83
91
1. For **IPv4 Address space**, accept the default **10.0.0.0/16**.
84
92
1. Under **Subnet**, select **default**.
@@ -89,37 +97,37 @@ This VNet will have two subnets.
89
97
Next, create a subnet for the workload server.
90
98
91
99
1. Select **Add subnet**.
92
-
4. For **Subnet name**, type **Workload-SN**.
93
-
5. For **Subnet address range**, type **10.0.2.0/24**.
94
-
6. Select **Add**.
95
-
7. Select **Review + create**.
96
-
8. Select **Create**.
100
+
1. For **Subnet name**, type **Workload-SN**.
101
+
1. For **Subnet address range**, type **10.0.2.0/24**.
102
+
1. Select **Add**.
103
+
1. Select **Review + create**.
104
+
1. Select **Create**.
97
105
98
106
### Create a virtual machine
99
107
100
108
Now create the workload virtual machine, and place it in the **Workload-SN** subnet.
101
109
102
110
1. On the Azure portal menu or from the **Home** page, select **Create a resource**.
103
-
2. Select **Windows Server 2016 Datacenter**.
104
-
4. Enter these values for the virtual machine:
105
-
106
-
|Setting |Value |
107
-
|---------|---------|
108
-
|Resource group |**Test-FW-RG**|
109
-
|Virtual machine name|**Srv-Work**|
110
-
|Region |Same as previous|
111
-
|Image|Windows Server 2016 Datacenter|
112
-
|Administrator user name|Type a user name|
113
-
|Password |Type a password|
114
-
115
-
4. Under **Inbound port rules**, **Public inbound ports**, select **None**.
116
-
6. Accept the other defaults and select **Next: Disks**.
117
-
7. Accept the disk defaults and select **Next: Networking**.
118
-
8. Make sure that **Test-FW-VN** is selected for the virtual network and the subnet is **Workload-SN**.
119
-
9. For **Public IP**, select **None**.
120
-
11. Accept the other defaults and select **Next: Management**.
121
-
12. Select **Disable** to disable boot diagnostics. Accept the other defaults and select **Review + create**.
122
-
13. Review the settings on the summary page, and then select **Create**.
111
+
1. Select **Windows Server 2019 Datacenter**.
112
+
1. Enter or select these values for the virtual machine:
113
+
114
+
|Setting | Value|
115
+
|-------|-----|
116
+
| Subscription | Select your Azure subscription. |
117
+
| Resource group| Select **Test-FW-RG**. |
118
+
| Virtual machine name | Enter *Srv-Work*.|
119
+
| Region | Select the same location that you used previously. |
120
+
| Username | Enter a username. |
121
+
|Password | Enter a password. |
122
+
123
+
1. Under **Inbound port rules**, **Public inbound ports**, select **None**.
124
+
1. Accept the other defaults and select **Next: Disks**.
125
+
1. Accept the disk defaults and select **Next: Networking**.
126
+
1. Make sure that **Test-FW-VN** is selected for the virtual network and the subnet is **Workload-SN**.
127
+
1. For **Public IP**, select **None**.
128
+
1. Accept the other defaults and select **Next: Management**.
129
+
1. Select **Disable** to disable boot diagnostics. Accept the other defaults and select **Review + create**.
130
+
1. Review the settings on the summary page, and then select **Create**.
123
131
1. After the deployment completes, select the **Srv-Work** resource and note the private IP address for later use.
124
132
125
133
## Deploy the firewall and policy
@@ -131,16 +139,16 @@ Deploy the firewall into the VNet.
131
139
3. Select **Firewall** and then select **Create**.
132
140
4. On the **Create a Firewall** page, use the following table to configure the firewall:
133
141
134
-
|Setting |Value |
135
-
|---------|---------|
136
-
|Subscription |\<your subscription\>|
137
-
|Resource group |**Test-FW-RG**|
138
-
|Name |**Test-FW01**|
139
-
|Region |Select the same location that you used previously|
140
-
|Firewall management|**Use a Firewall Policy to manage this firewall**|
141
-
|Firewall policy|**Add new**:<br>**fw-test-pol**<br>your selected region
142
-
|Choose a virtual network |**Use existing**: **Test-FW-VN**|
143
-
|Public IP address |**Add new**:<br>**Name**: **fw-pip**|
142
+
|Setting | Value|
143
+
|-------|-----|
144
+
|Subscription | Select your Azure subscription. |
145
+
|Resource group | Select **Test-FW-RG**.|
146
+
|Name | Enter *Test-FW01*. |
147
+
|Region |Select the same location that you used previously. |
148
+
|Firewall management| Select **Use a Firewall Policy to manage this firewall**. |
149
+
|Firewall policy | Select **Add new**, and enter *fw-test-pol*. <br> Select the same region that you used previously.
150
+
|Choose a virtual network | Select **Use existing**, and then select **Test-FW-VN**. |
151
+
|Public IP address | Select **Add new**, and enter *fw-pip* for the **Name**. |
144
152
145
153
5. Accept the other default values, then select **Review + create**.
146
154
6. Review the summary, and then select **Create** to create the firewall.
@@ -154,47 +162,49 @@ Deploy the firewall into the VNet.
154
162
For the **Workload-SN** subnet, configure the outbound default route to go through the firewall.
155
163
156
164
1. On the Azure portal menu, select **All services** or search for and select *All services* from any page.
157
-
2. Under **Networking**, select **Route tables**.
158
-
3. Select **Add**.
159
-
5. For **Subscription**, select your subscription.
160
-
6. For **Resource group**, select **Test-FW-RG**.
161
-
7. For **Region**, select the same location that you used previously.
162
-
4. For **Name**, type **Firewall-route**.
165
+
1. Under **Networking**, select **Route tables**.
166
+
1. Select **Create**, then enter or select the following values:
167
+
168
+
| Setting | Value |
169
+
| ------- | ----- |
170
+
| Subscription | Select your Azure subscription. |
171
+
| Resource group | Select **Test-FW-RG**. |
172
+
| Region | Select the same location that you used previously. |
173
+
| Name | Enter *Firewall-route*. |
174
+
163
175
1. Select **Review + create**.
164
176
1. Select **Create**.
165
177
166
178
After deployment completes, select **Go to resource**.
167
179
168
-
1. On the Firewall-route page, select **Subnets** and then select **Associate**.
180
+
1. On the **Firewall-route** page, select **Subnets** and then select **Associate**.
169
181
1. Select **Virtual network** > **Test-FW-VN**.
170
182
1. For **Subnet**, select **Workload-SN**. Make sure that you select only the **Workload-SN** subnet for this route, otherwise your firewall won't work correctly.
171
-
172
-
13. Select **OK**.
173
-
14. Select **Routes** and then select **Add**.
174
-
15. For **Route name**, type **fw-dg**.
175
-
16. For **Address prefix**, type **0.0.0.0/0**.
176
-
17. For **Next hop type**, select **Virtual appliance**.
177
-
183
+
1. Select **OK**.
184
+
1. Select **Routes** and then select **Add**.
185
+
1. For **Route name**, enter *fw-dg*.
186
+
1. For **Address prefix**, enter *0.0.0.0/0*.
187
+
1. For **Next hop type**, select **Virtual appliance**.
178
188
Azure Firewall is actually a managed service, but virtual appliance works in this situation.
179
-
18. For **Next hop address**, type the private IP address for the firewall that you noted previously.
180
-
19. Select **OK**.
189
+
1. For **Next hop address**, enter the private IP address for the firewall that you noted previously.
190
+
1. Select **OK**.
181
191
182
192
## Configure an application rule
183
193
184
194
This is the application rule that allows outbound access to `www.google.com`.
185
195
186
-
1. Open the **Test-FW-RG**, and select the **fw-test-pol** firewall policy.
196
+
1. Open the **Test-FW-RG** resource group, and select the **fw-test-pol** firewall policy.
187
197
1. Select **Application rules**.
188
198
1. Select **Add a rule collection**.
189
-
1. For **Name**, type **App-Coll01**.
190
-
1. For **Priority**, type **200**.
199
+
1. For **Name**, enter *App-Coll01*.
200
+
1. For **Priority**, enter *200*.
191
201
1. For **Rule collection action**, select **Allow**.
192
-
1. Under **Rules**, for **Name**, type **Allow-Google**.
202
+
1. Under **Rules**, for **Name**, enter *Allow-Google*.
193
203
1. For **Source type**, select **IP address**.
194
-
1. For **Source**, type **10.0.2.0/24**.
195
-
1. For **Protocol:port**, type **http, https**.
204
+
1. For **Source**, enter *10.0.2.0/24*.
205
+
1. For **Protocol:port**, enter *http, https*.
196
206
1. For **Destination Type**, select **FQDN**.
197
-
1. For **Destination**, type **`www.google.com`**
207
+
1. For **Destination**, enter *`www.google.com`*
198
208
1. Select **Add**.
199
209
200
210
Azure Firewall includes a built-in rule collection for infrastructure FQDNs that are allowed by default. These FQDNs are specific for the platform and can't be used for other purposes. For more information, see [Infrastructure FQDNs](infrastructure-fqdns.md).
@@ -205,37 +215,37 @@ This is the network rule that allows outbound access to two IP addresses at port
205
215
206
216
1. Select **Network rules**.
207
217
2. Select **Add a rule collection**.
208
-
3. For **Name**, type **Net-Coll01**.
209
-
4. For **Priority**, type **200**.
218
+
3. For **Name**, enter *Net-Coll01*.
219
+
4. For **Priority**, enter *200*.
210
220
5. For **Rule collection action**, select **Allow**.
211
221
1. For **Rule collection group**, select **DefaultNetworkRuleCollectionGroup**.
212
-
1. Under **Rules**, for **Name**, type **Allow-DNS**.
222
+
1. Under **Rules**, for **Name**, enter *Allow-DNS*.
213
223
1. For **Source type**, select **IP Address**.
214
-
1. For **Source**, type **10.0.2.0/24**.
224
+
1. For **Source**, enter *10.0.2.0/24*.
215
225
1. For **Protocol**, select **UDP**.
216
-
1. For **Destination Ports**, type **53**.
226
+
1. For **Destination Ports**, enter *53*.
217
227
1. For **Destination type** select **IP address**.
218
-
1. For **Destination**, type **209.244.0.3,209.244.0.4**.<br>These are public DNS servers operated by CenturyLink.
228
+
1. For **Destination**, enter *209.244.0.3,209.244.0.4*.<br>These are public DNS servers operated by CenturyLink.
219
229
2. Select **Add**.
220
230
221
231
## Configure a DNAT rule
222
232
223
-
This rule allows you to connect a remote desktop to the Srv-Work virtual machine through the firewall.
233
+
This rule allows you to connect a remote desktop to the **Srv-Work** virtual machine through the firewall.
224
234
225
235
1. Select the **DNAT rules**.
226
236
2. Select **Add a rule collection**.
227
-
3. For **Name**, type **rdp**.
228
-
1. For **Priority**, type **200**.
237
+
3. For **Name**, enter *rdp*.
238
+
1. For **Priority**, enter *200*.
229
239
1. For **Rule collection group**, select **DefaultDnatRuleCollectionGroup**.
230
-
1. Under **Rules**, for **Name**, type **rdp-nat**.
240
+
1. Under **Rules**, for **Name**, enter *rdp-nat*.
231
241
1. For **Source type**, select **IP address**.
232
-
1. For **Source**, type **\***.
242
+
1. For **Source**, enter *\**.
233
243
1. For **Protocol**, select **TCP**.
234
-
1. For **Destination Ports**, type **3389**.
244
+
1. For **Destination Ports**, enter *3389*.
235
245
1. For **Destination Type**, select **IP Address**.
236
-
1. For **Destination**, type the firewall public IP address.
237
-
1. For **Translated address**, type the **Srv-work** private IP address.
238
-
1. For **Translated port**, type **3389**.
246
+
1. For **Destination**, enter the firewall public IP address.
247
+
1. For **Translated address**, enter the **Srv-work** private IP address.
248
+
1. For **Translated port**, enter *3389*.
239
249
1. Select **Add**.
240
250
241
251
@@ -247,7 +257,7 @@ For testing purposes in this tutorial, configure the server's primary and second
247
257
2. Select the network interface for the **Srv-Work** virtual machine.
248
258
3. Under **Settings**, select **DNS servers**.
249
259
4. Under **DNS servers**, select **Custom**.
250
-
5.Type **209.244.0.3** in the **Add DNS server** text box, and **209.244.0.4** in the next text box.
260
+
5.Enter *209.244.0.3* in the **Add DNS server** text box, and *209.244.0.4* in the next text box.
0 commit comments