Skip to content

Commit 6a4594f

Browse files
Merge pull request #276521 from vhorne/waf-ip-restrict
add tabs
2 parents 9a2c17d + ff866bc commit 6a4594f

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

articles/web-application-firewall/afds/waf-front-door-configure-ip-restriction.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: web-application-firewall
55
author: vhorne
66
ms.service: web-application-firewall
77
ms.topic: article
8-
ms.date: 11/16/2022
8+
ms.date: 05/29/2024
99
ms.author: victorh
1010
ms.custom: devx-track-azurepowershell, devx-track-azurecli
1111
---
@@ -20,9 +20,11 @@ There are two types of match variables in an IP address match: `RemoteAddr` and
2020

2121
By default, your web application is accessible from the internet. If you want to limit access to clients from a list of known IP addresses or IP address ranges, you can create an IP matching rule that contains the list of IP addresses as matching values and sets the operator to `Not` (negate is true) and the action to `Block`. After an IP restriction rule is applied, requests that originate from addresses outside this allowed list receive a 403 Forbidden response.
2222

23-
## Configure a WAF policy with the Azure portal
23+
## Configure a WAF policy
2424

25-
Follow these steps to configure a WAF policy by using the Azure portal.
25+
#### [Portal](#tab/browser)
26+
27+
Follow these steps to configure a WAF policy using the Azure portal.
2628

2729
### Prerequisites
2830

@@ -41,8 +43,8 @@ Create an Azure Front Door profile by following the instructions described in [Q
4143
|Subscription |Select your subscription.|
4244
|Resource group |Select the resource group where your Azure Front Door instance is located.|
4345
|Policy name |Enter a name for your policy.|
44-
|Policy state |Selected.|
45-
|Policy mode|Prevention.|
46+
|Policy state |Selected|
47+
|Policy mode|Prevention|
4648

4749
1. Select **Next: Managed rules**.
4850

@@ -86,9 +88,9 @@ Create an Azure Front Door profile by following the instructions described in [Q
8688
> [!NOTE]
8789
> A private IP address was intentionally used in the custom rule to guarantee the rule would trigger. In an actual deployment, create *allow* and *deny* rules by using IP addresses for your particular situation.
8890
89-
## Configure a WAF policy with the Azure CLI
91+
#### [CLI](#tab/azure-devops-cli)
9092

91-
Follow these steps to configure a WAF policy by using the Azure CLI.
93+
Follow these steps to configure a WAF policy using the Azure CLI.
9294

9395
### Prerequisites
9496
Before you begin to configure an IP restriction policy, set up your CLI environment and create an Azure Front Door profile.
@@ -173,17 +175,18 @@ In this example, the WAF policy is applied to `FrontendEndpoints[0]`. You can li
173175
> [!Note]
174176
> You need to set the `WebApplicationFirewallPolicyLink` property only once to link a WAF policy to an Azure Front Door front end. Subsequent policy updates are automatically applied to the front end.
175177
176-
## Configure a WAF policy with Azure PowerShell
178+
#### [Azure PowerShell](#tab/powershell)
179+
177180

178-
Follow these steps to configure a WAF policy by using Azure PowerShell.
181+
Follow these steps to configure a WAF policy using Azure PowerShell.
179182

180183
### Prerequisites
181184
Before you begin to configure an IP restriction policy, set up your PowerShell environment and create an Azure Front Door profile.
182185

183186
#### Set up your PowerShell environment
184187
Azure PowerShell provides a set of cmdlets that use the [Azure Resource Manager](../../azure-resource-manager/management/overview.md) model for managing Azure resources.
185188

186-
You can install [Azure PowerShell](/powershell/azure/) on your local machine and use it in any PowerShell session. Follow the instructions on the page to sign in to PowerShell by using your Azure credentials and then install the Az module.
189+
You can install [Azure PowerShell](/powershell/azure/) on your local machine and use it in any PowerShell session. Follow the instructions on the page to sign in to PowerShell by using your Azure credentials and then install the Az PowerShell module module.
187190

188191
1. Connect to Azure by using the following command and then use an interactive dialog to sign in.
189192
```
@@ -257,8 +260,11 @@ Link a WAF policy object to an existing front-end host and update Azure Front Do
257260
> [!NOTE]
258261
> In this example, the WAF policy is applied to `FrontendEndpoints[0]`. You can link a WAF policy to any of your front ends. You need to set the `WebApplicationFirewallPolicyLink` property only once to link a WAF policy to an Azure Front Door front end. Subsequent policy updates are automatically applied to the front end.
259262
260-
## Configure a WAF policy with a Resource Manager template
261-
To view the template that creates an Azure Front Door policy and a WAF policy with custom IP restriction rules, go to [GitHub](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.network/front-door-waf-clientip).
263+
#### [Template](#tab/yaml)
264+
265+
To view the Resource Manager template that creates an Azure Front Door policy and a WAF policy with custom IP restriction rules, go to [GitHub](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.network/front-door-waf-clientip).
266+
267+
---
262268

263269
## Next steps
264270

0 commit comments

Comments
 (0)