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/deploy-firewall-basic-portal-policy.md
+70-79Lines changed: 70 additions & 79 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: how-to
8
-
ms.date: 09/07/2022
8
+
ms.date: 09/12/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.
@@ -26,16 +26,15 @@ One way you can control outbound network access from an Azure subnet is with Azu
26
26
27
27
Network traffic is subjected to the configured firewall rules when you route your network traffic to the firewall as the subnet default gateway.
28
28
29
-
For this how-to, you create a simplified single VNet with two subnets for easy deployment.
30
-
31
-
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.
29
+
For this how-to, you create a simplified single VNet with three subnets for easy deployment. The Firewall Basic Preview is deployed in forced tunnelling mode to allow for traffic throughput control.
32
30
33
31
***AzureFirewallSubnet** - the firewall is in this subnet.
32
+
***AzureFirewallManagementSubnet** - for service management traffic.
34
33
***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.
37
36
38
-
In this tutorial, you learn how to:
37
+
In this how-to, you learn how to:
39
38
40
39
> [!div class="checklist"]
41
40
> * Set up a test network environment
@@ -52,67 +51,84 @@ If you prefer, you can complete this procedure using [Azure PowerShell](deploy-p
52
51
53
52
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
54
53
55
-
## Set up the network
54
+
### Enable Firewall Basic
55
+
56
+
For the preview, you must enable Firewall Basic before you begin.
56
57
57
-
First, create a resource group to contain the resources needed to deploy the firewall. Then create a VNet, subnets, and a test server.
58
+
```azurepowershell
59
+
Connect-AzAccount
60
+
Select-AzSubscription -Subscription "subscription_id or subscription_name"
The resource group contains all the resources for the tutorial.
67
+
The resource group contains all the resources for the how-to.
62
68
63
69
1. Sign in to the Azure portal at [https://portal.azure.com](https://portal.azure.com).
64
-
2. On the Azure portal menu, select **Resource groups** or search for and select *Resource groups* from any page. Then select **Add**.
70
+
2. On the Azure portal menu, select **Resource groups** or search for and select *Resource groups* from any page. Then select **Create**.
65
71
4. For **Subscription**, select your subscription.
66
72
1. For **Resource group name**, enter *Test-FW-RG*.
67
73
1. For **Region**, select a region. All other resources that you create must be in the same region.
68
74
1. Select **Review + create**.
69
75
1. Select **Create**.
70
76
71
-
### Create a VNet
72
-
73
-
This VNet will have two subnets.
77
+
## Deploy the firewall and policy
74
78
75
-
> [!NOTE]
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).
79
+
Deploy the firewall and create associated network infrastructure.
77
80
78
81
1. On the Azure portal menu or from the **Home** page, select **Create a resource**.
79
-
1. Select **Networking**.
80
-
1. Search for **Virtual network** and select it.
81
-
1. Select **Create**.
82
-
1. For **Subscription**, select your subscription.
83
-
1. For **Resource group**, select **Test-FW-RG**.
84
-
1. For **Name**, type **Test-FW-VN**.
85
-
1. For **Region**, select the same location that you used previously.
86
-
1. Select **Next: IP addresses**.
87
-
1. For **IPv4 Address space**, accept the default **10.0.0.0/16**.
88
-
1. Under **Subnet**, select **default**.
89
-
1. For **Subnet name** change the name to **AzureFirewallSubnet**. The firewall will be in this subnet, and the subnet name **must** be AzureFirewallSubnet.
90
-
1. For **Address range**, type **10.0.1.0/26**.
91
-
1. Select **Save**.
82
+
2. Type **firewall** in the search box and press **Enter**.
83
+
3. Select **Firewall** and then select **Create**.
84
+
4. On the **Create a Firewall** page, use the following table to configure the firewall:
85
+
86
+
|Setting |Value |
87
+
|---------|---------|
88
+
|Subscription |\<your subscription\>|
89
+
|Resource group |**Test-FW-RG**|
90
+
|Name |**Test-FW01**|
91
+
|Region |Select the same location that you used previously|
92
+
|Firewall Tier|**Basic (Preview)**|
93
+
|Firewall management|**Use a Firewall Policy to manage this firewall**|
94
+
|Firewall policy|**Add new**:<br>**fw-test-pol**<br>Your selected region<br>Policy tier should default to **Basic**
|Management public IP address| **Add new**<br>**fw-mgmt-pip**
92
99
93
-
Next, create a subnet for the workload server.
100
+
5. Accept the other default values, then select **Review + create**.
101
+
6. Review the summary, and then select **Create** to create the firewall.
102
+
103
+
This will take a few minutes to deploy.
104
+
7. After deployment completes, go to the **Test-FW-RG** resource group, and select the **Test-FW01** firewall.
105
+
8. Note the firewall private and public IP (fw-pip) addresses. You'll use these addresses later.
94
106
95
-
1. Select **Add subnet**.
96
-
4. For **Subnet name**, type **Workload-SN**.
97
-
5. For **Subnet address range**, type **10.0.2.0/24**.
98
-
6. Select **Add**.
99
-
7. Select **Review + create**.
100
-
8. Select **Create**.
107
+
## Create a subnet for the workload server
101
108
102
-
### Create a virtual machine
109
+
Next, create a subnet for the workload server.
110
+
111
+
1. Go to the Test-FW-RG resource group and select the **Test-FW-VN** virtual network.
112
+
1. Select **Subnets**.
113
+
1. Select **Subnet**.
114
+
1. For **Subnet name**, type **Workload-SN**.
115
+
1. For **Subnet address range**, type **10.0.2.0/24**.
116
+
1. Select **Save**.
117
+
118
+
## Create a virtual machine
103
119
104
120
Now create the workload virtual machine, and place it in the **Workload-SN** subnet.
105
121
106
122
1. On the Azure portal menu or from the **Home** page, select **Create a resource**.
107
-
2. Select **Windows Server 2016 Datacenter**.
123
+
2. Select **Windows Server 2019 Datacenter**.
108
124
4. Enter these values for the virtual machine:
109
125
110
126
|Setting |Value |
111
127
|---------|---------|
112
128
|Resource group |**Test-FW-RG**|
113
129
|Virtual machine name |**Srv-Work**|
114
130
|Region |Same as previous|
115
-
|Image|Windows Server 2016 Datacenter|
131
+
|Image|Windows Server 2019 Datacenter|
116
132
|Administrator user name |Type a user name|
117
133
|Password |Type a password|
118
134
@@ -122,45 +138,18 @@ Now create the workload virtual machine, and place it in the **Workload-SN** sub
122
138
8. Make sure that **Test-FW-VN** is selected for the virtual network and the subnet is **Workload-SN**.
123
139
9. For **Public IP**, select **None**.
124
140
11. Accept the other defaults and select **Next: Management**.
125
-
12. Select **Disable** to disable boot diagnostics. Accept the other defaults and select **Review + create**.
126
-
13. Review the settings on the summary page, and then select **Create**.
141
+
1. Select **Next: Monitoring**.
142
+
1. Select **Disable** to disable boot diagnostics. Accept the other defaults and select **Review + create**.
143
+
1. Review the settings on the summary page, and then select **Create**.
127
144
1. After the deployment completes, select the **Srv-Work** resource and note the private IP address for later use.
128
145
129
-
## Deploy the firewall and policy
130
-
131
-
Deploy the firewall into the VNet.
132
-
133
-
1. On the Azure portal menu or from the **Home** page, select **Create a resource**.
134
-
2. Type **firewall** in the search box and press **Enter**.
135
-
3. Select **Firewall** and then select **Create**.
136
-
4. On the **Create a Firewall** page, use the following table to configure the firewall:
137
-
138
-
|Setting |Value |
139
-
|---------|---------|
140
-
|Subscription |\<your subscription\>|
141
-
|Resource group |**Test-FW-RG**|
142
-
|Name |**Test-FW01**|
143
-
|Region |Select the same location that you used previously|
144
-
|Firewall Tier|**Basic**|
145
-
|Firewall management|**Use a Firewall Policy to manage this firewall**|
146
-
|Firewall policy|**Add new**:<br>**fw-test-pol**<br>Policy tier should default to **Basic**<br>Your selected region
147
-
|Choose a virtual network |**Use existing**: **Test-FW-VN**|
148
-
|Public IP address |**Add new**:<br>**Name**: **fw-pip**|
149
-
150
-
5. Accept the other default values, then select **Review + create**.
151
-
6. Review the summary, and then select **Create** to create the firewall.
152
-
153
-
This will take a few minutes to deploy.
154
-
7. After deployment completes, go to the **Test-FW-RG** resource group, and select the **Test-FW01** firewall.
155
-
8. Note the firewall private and public IP addresses. You'll use these addresses later.
156
-
157
146
## Create a default route
158
147
159
148
For the **Workload-SN** subnet, configure the outbound default route to go through the firewall.
160
149
161
150
1. On the Azure portal menu, select **All services** or search for and select *All services* from any page.
162
151
2. Under **Networking**, select **Route tables**.
163
-
3. Select **Add**.
152
+
3. Select **Create**.
164
153
5. For **Subscription**, select your subscription.
165
154
6. For **Resource group**, select **Test-FW-RG**.
166
155
7. For **Region**, select the same location that you used previously.
@@ -177,12 +166,13 @@ After deployment completes, select **Go to resource**.
177
166
13. Select **OK**.
178
167
14. Select **Routes** and then select **Add**.
179
168
15. For **Route name**, type **fw-dg**.
180
-
16. For **Address prefix**, type **0.0.0.0/0**.
181
-
17. For **Next hop type**, select **Virtual appliance**.
169
+
1. For **Address prefix destination**, select **IP Addresses**.
170
+
1. For **Destination IP addresses/CIDR ranges**, type **0.0.0.0/0**.
171
+
1. For **Next hop type**, select **Virtual appliance**.
182
172
183
173
Azure Firewall is actually a managed service, but virtual appliance works in this situation.
184
174
18. For **Next hop address**, type the private IP address for the firewall that you noted previously.
185
-
19. Select **OK**.
175
+
19. Select **Add**.
186
176
187
177
## Configure an application rule
188
178
@@ -220,7 +210,7 @@ This is the network rule that allows outbound access to two IP addresses at port
220
210
1. For **Protocol**, select **UDP**.
221
211
1. For **Destination Ports**, type **53**.
222
212
1. For **Destination type** select **IP address**.
223
-
1. For **Destination**, type **209.244.0.3,209.244.0.4**.<br>These are public DNS servers operated by CenturyLink.
213
+
1. For **Destination**, type **209.244.0.3,209.244.0.4**.<br>These are public DNS servers operated by Level3.
224
214
2. Select **Add**.
225
215
226
216
## Configure a DNAT rule
@@ -238,15 +228,15 @@ This rule allows you to connect a remote desktop to the Srv-Work virtual machine
238
228
1. For **Protocol**, select **TCP**.
239
229
1. For **Destination Ports**, type **3389**.
240
230
1. For **Destination Type**, select **IP Address**.
241
-
1. For **Destination**, type the firewall public IP address.
231
+
1. For **Destination**, type the firewall public IP address (fw-pip).
242
232
1. For **Translated address**, type the **Srv-work** private IP address.
243
233
1. For **Translated port**, type **3389**.
244
234
1. Select **Add**.
245
235
246
236
247
237
### Change the primary and secondary DNS address for the **Srv-Work** network interface
248
238
249
-
For testing purposes in this tutorial, configure the server's primary and secondary DNS addresses. This isn't a general Azure Firewall requirement.
239
+
For testing purposes in this how-to, configure the server's primary and secondary DNS addresses. This isn't a general Azure Firewall requirement.
250
240
251
241
1. On the Azure portal menu, select **Resource groups** or search for and select *Resource groups* from any page. Select the **Test-FW-RG** resource group.
252
242
2. Select the network interface for the **Srv-Work** virtual machine.
@@ -260,24 +250,25 @@ For testing purposes in this tutorial, configure the server's primary and second
260
250
261
251
Now, test the firewall to confirm that it works as expected.
262
252
263
-
1. Connect a remote desktop to firewall public IP address and sign in to the **Srv-Work** virtual machine.
253
+
1. Connect a remote desktop to firewall public IP address (fw-pip) and sign in to the **Srv-Work** virtual machine.
264
254
3. Open Internet Explorer and browse to `https://www.google.com`.
265
255
4. Select **OK** > **Close** on the Internet Explorer security alerts.
266
256
267
257
You should see the Google home page.
268
258
269
-
5. Browse to `https://www.microsoft.com`.
259
+
5. Browse to `http://www.microsoft.com`.
270
260
271
261
You should be blocked by the firewall.
272
262
273
263
So now you've verified that the firewall rules are working:
274
264
265
+
* You can connect a remote desktop to the Srv-Work virtual machine.
275
266
* You can browse to the one allowed FQDN, but not to any others.
276
267
* You can resolve DNS names using the configured external DNS server.
277
268
278
269
## Clean up resources
279
270
280
-
You can keep your firewall resources for the next tutorial, or if no longer needed, delete the **Test-FW-RG** resource group to delete all firewall-related resources.
271
+
You can keep your firewall resources for further testing, or if no longer needed, delete the **Test-FW-RG** resource group to delete all firewall-related resources.
0 commit comments