Skip to content

Commit f088c38

Browse files
Merge pull request #212071 from v-thepet/linter-control1
Control PR for the quickstart linter project
2 parents eb26bfb + f28c860 commit f088c38

File tree

2 files changed

+40
-34
lines changed

2 files changed

+40
-34
lines changed
Loading
Lines changed: 40 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,79 @@
11
---
2-
title: 'Quickstart: Create an Azure WAF v2 on Application Gateway - Azure Resource Manager template'
2+
title: 'Quickstart: Create an Azure WAF v2 by using an Azure Resource Manager template'
33
titleSuffix: Azure Application Gateway
4-
description: Learn how to use an Azure Resource Manager quickstart template (ARM template) to create a Web Application Firewall v2 on Azure Application Gateway.
4+
description: Use a quickstart Azure Resource Manager template (ARM template) to create a Web Application Firewall v2 on Azure Application Gateway.
55
services: web-application-firewall
66
author: vhorne
77
ms.service: web-application-firewall
88
ms.topic: quickstart
9-
ms.date: 09/16/2020
9+
ms.date: 09/20/2022
1010
ms.author: victorh
11-
ms.custom: subject-armqs, devx-track-azurepowershell, mode-arm
11+
ms.custom: subject-armqs, devx-track-azurepowershell, mode-arm, template-quickstart
12+
# Customer intent: As a cloud administrator, I want to quickly deploy a Web Application Firewall v2 on Azure Application Gateway for production environments or to evaluate WAF v2 functionality.
1213
---
1314

14-
# Quickstart: Create an Azure WAF v2 on Application Gateway using an ARM template
15+
# Quickstart: Create an Azure Web Application Firewall v2 by using an ARM template
1516

16-
In this quickstart, you use an Azure Resource Manager template (ARM template) to create an Azure Web Application Firewall v2 on Application Gateway.
17+
In this quickstart, you use an Azure Resource Manager template (ARM template) to create an Azure Web Application Firewall (WAF) v2 on Azure Application Gateway.
1718

1819
[!INCLUDE [About Azure Resource Manager](../../../includes/resource-manager-quickstart-introduction.md)]
1920

2021
[!INCLUDE [updated-for-az](../../../includes/updated-for-az.md)]
2122

22-
If your environment meets the prerequisites and you're familiar with using ARM templates, select the **Deploy to Azure** button. The template will open in the Azure portal.
23+
If your environment meets the prerequisites and you're familiar with using ARM templates, you can select the **Deploy to Azure** button to open the template in the Azure portal.
2324

24-
[![Deploy to Azure](../../media/template-deployments/deploy-to-azure.svg)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fdemos%2Fag-docs-wafv2%2Fazuredeploy.json)
25+
[![Deploy to Azure button.](../../media/template-deployments/deploy-to-azure.svg)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fdemos%2Fag-docs-wafv2%2Fazuredeploy.json)
2526

2627
## Prerequisites
2728

28-
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
29+
- An Azure account with an active subscription. If you don't have one, you can [create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
2930

3031
## Review the template
3132

32-
This template creates a simple Web Application Firewall v2 on Azure Application Gateway. This includes a public IP frontend IP address, HTTP settings, a rule with a basic listener on port 80, and a backend pool. A WAF policy with a custom rule is created to block traffic to the backend pool based on an IP address match type.
33+
This template creates a simple Web Application Firewall v2 on Azure Application Gateway. The template creates a public IP frontend IP address, HTTP settings, a rule with a basic listener on port 80, and a backend pool. A WAF policy with a custom rule blocks traffic to the backend pool based on an IP address match type.
3334

34-
The template used in this quickstart is from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/ag-docs-wafv2/).
35+
The template defines the following Azure resources:
3536

36-
:::code language="json" source="~/quickstart-templates/demos/ag-docs-wafv2/azuredeploy.json":::
37+
- [Microsoft.Network/applicationgateways](/azure/templates/microsoft.network/applicationgateways)
38+
- [Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies](/azure/templates/microsoft.network/ApplicationGatewayWebApplicationFirewallPolicies)
39+
- [Microsoft.Network/publicIPAddresses](/azure/templates/microsoft.network/publicipaddresses), one for the application gateway and two for the virtual machines (VMs)
40+
- [Microsoft.Network/networkSecurityGroups](/azure/templates/microsoft.network/networksecuritygroups)
41+
- [Microsoft.Network/virtualNetworks](/azure/templates/microsoft.network/virtualnetworks)
42+
- [Microsoft.Compute/virtualMachines](/azure/templates/microsoft.compute/virtualmachines), two VMs
43+
- [Microsoft.Network/networkInterfaces](/azure/templates/microsoft.network/networkinterfaces), one for each VM
44+
- [Microsoft.Compute/virtualMachine/extensions](/azure/templates/microsoft.compute/virtualmachines/extensions) to configure IIS and the web pages
3745

38-
Multiple Azure resources are defined in the template:
46+
This template is from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/ag-docs-wafv2/).
3947

40-
- [**Microsoft.Network/applicationgateways**](/azure/templates/microsoft.network/applicationgateways)
41-
- [**Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies**](/azure/templates/microsoft.network/ApplicationGatewayWebApplicationFirewallPolicies)
42-
- [**Microsoft.Network/publicIPAddresses**](/azure/templates/microsoft.network/publicipaddresses) : one for the application gateway, and two for the virtual machines.
43-
- [**Microsoft.Network/networkSecurityGroups**](/azure/templates/microsoft.network/networksecuritygroups)
44-
- [**Microsoft.Network/virtualNetworks**](/azure/templates/microsoft.network/virtualnetworks)
45-
- [**Microsoft.Compute/virtualMachines**](/azure/templates/microsoft.compute/virtualmachines) : two virtual machines
46-
- [**Microsoft.Network/networkInterfaces**](/azure/templates/microsoft.network/networkinterfaces) : two for the virtual machines
47-
- [**Microsoft.Compute/virtualMachine/extensions**](/azure/templates/microsoft.compute/virtualmachines/extensions) : to configure IIS and the web pages
48+
:::code language="json" source="~/quickstart-templates/demos/ag-docs-wafv2/azuredeploy.json":::
4849

4950
## Deploy the template
5051

5152
Deploy the ARM template to Azure:
5253

53-
1. Select **Deploy to Azure** to sign in to Azure and open the template. The template creates an application gateway, the network infrastructure, and two virtual machines in the backend pool running IIS.
54+
1. Select **Deploy to Azure** to sign in to Azure and open the template. The template creates an application gateway, the network infrastructure, and two VMs in the backend pool running IIS.
5455

55-
[![Deploy to Azure](../../media/template-deployments/deploy-to-azure.svg)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fdemos%2Fag-docs-wafv2%2Fazuredeploy.json)
56+
[![Deploy to Azure button.](../../media/template-deployments/deploy-to-azure.svg)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fdemos%2Fag-docs-wafv2%2Fazuredeploy.json)
5657

57-
2. Select or create your resource group.
58-
3. Select **I agree to the terms and conditions stated above** and then select **Purchase**. The deployment can take 10 minutes or longer to complete.
58+
1. Select or create a resource group.
59+
1. Select **Review + create**, and when validation passes, select **Create**. The deployment can take 10 minutes or longer to complete.
5960

6061
## Validate the deployment
6162

62-
Although IIS isn't required to create the application gateway, it's installed on the backend servers to verify if Azure successfully created a WAF v2 on the application gateway.
63+
Although IIS isn't required, the template installs IIS on the backend servers so you can verify that Azure successfully created a WAF v2 on the application gateway.
6364

6465
Use IIS to test the application gateway:
6566

66-
1. Find the public IP address for the application gateway on its **Overview** page.![Record application gateway public IP address](../../application-gateway/media/application-gateway-create-gateway-portal/application-gateway-record-ag-address.png) Or, you can select **All resources**, enter *myAGPublicIPAddress* in the search box, and then select it in the search results. Azure displays the public IP address on the **Overview** page.
67-
2. Copy the public IP address, and then paste it into the address bar of your browser to browse that IP address.
68-
3. Check the response. A **403 Forbidden** response verifies that the WAF was successfully created and is blocking connections to the backend pool.
69-
4. Change the custom rule to **Allow traffic**.
70-
Run the following Azure PowerShell script, replacing your resource group name:
67+
1. Copy the public IP address for the application gateway from its **Overview** page.
68+
69+
![Screenshot that shows the application gateway public IP address.](../../application-gateway/media/application-gateway-create-gateway-portal/application-gateway-record-ag-address.png)
70+
71+
You can also search for *application gateways* in the Azure search box. The list of application gateways shows the public IP addresses in the **Public IP address** column.
72+
73+
1. Paste the IP address into the address bar of your browser to browse that address.
74+
1. Check the response. A **403 Forbidden** response verifies that the WAF is successfully blocking connections to the backend pool.
75+
1. To change the custom rule to allow traffic, run the following Azure PowerShell script, replacing your resource group name:
76+
7177
```azurepowershell
7278
$rg = "<your resource group name>"
7379
$AppGW = Get-AzApplicationGateway -Name myAppGateway -ResourceGroupName $rg
@@ -79,11 +85,11 @@ Use IIS to test the application gateway:
7985
Set-AzApplicationGateway -ApplicationGateway $AppGW
8086
```
8187

82-
Refresh your browser multiple times and you should see connections to both myVM1 and myVM2.
88+
1. Refresh your browser several times. You should see connections to both myVM1 and myVM2.
8389

8490
## Clean up resources
8591

86-
When you no longer need the resources that you created with the application gateway, delete the resource group. This removes the application gateway and all the related resources.
92+
When you no longer need the resources you created in this quickstart, delete the resource group to remove the application gateway and all its related resources.
8793

8894
To delete the resource group, call the `Remove-AzResourceGroup` cmdlet:
8995

@@ -94,4 +100,4 @@ Remove-AzResourceGroup -Name "<your resource group name>"
94100
## Next steps
95101

96102
> [!div class="nextstepaction"]
97-
> [Tutorial: Create an application gateway with a Web Application Firewall using the Azure portal](application-gateway-web-application-firewall-portal.md)
103+
> [Tutorial: Create an application gateway with a Web Application Firewall by using the Azure portal](application-gateway-web-application-firewall-portal.md)

0 commit comments

Comments
 (0)