Skip to content

Commit dc28638

Browse files
committed
added - Add access restrictions rules programmatically
1 parent 6a6516b commit dc28638

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

articles/app-service/app-service-ip-restrictions.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ You must have at least the following Role-based access control permissions on th
5959

6060
**only required when adding a virtual network (service endpoint) rule.*
6161

62-
If you are adding a service endpoint-based rule and the virtual network is in a different subscription than the app, you must ensure that the subscription with the virtual network is registered for the Microsoft.Web resource provider. You can explicitly register the provider [by following this documentation](../azure-resource-manager/management/resource-providers-and-types.md#register-resource-provider), but it will also automatically be registered when creating the first web app in a subscription.
62+
If you're adding a service endpoint-based rule and the virtual network is in a different subscription than the app, you must ensure that the subscription with the virtual network is registered for the Microsoft.Web resource provider. You can explicitly register the provider [by following this documentation](../azure-resource-manager/management/resource-providers-and-types.md#register-resource-provider), but it will also automatically be registered when creating the first web app in a subscription.
6363

6464
### Add an access restriction rule
6565

@@ -151,7 +151,7 @@ For each header name, you can add up to eight values separated by comma. The htt
151151

152152
### Multi-source rules
153153

154-
Multi-source rules allow you to combine up to eight IP ranges or eight Service Tags in a single rule. You might use this if you have more than 512 IP ranges or you want to create logical rules where multiple IP ranges are combined with a single http header filter.
154+
Multi-source rules allow you to combine up to eight IP ranges or eight Service Tags in a single rule. You might use this if you've more than 512 IP ranges or you want to create logical rules where multiple IP ranges are combined with a single http header filter.
155155

156156
Multi-source rules are defined the same way you define single-source rules, but with each range separated with comma.
157157

@@ -171,12 +171,12 @@ For a scenario where you want to explicitly block a single IP address or a block
171171

172172
### Restrict access to an SCM site
173173

174-
In addition to being able to control access to your app, you can restrict access to the SCM (Advanced tool) site that's used by your app. The SCM site is both the web deploy endpoint and the Kudu console. You can assign access restrictions to the SCM site from the app separately or use the same set of restrictions for both the app and the SCM site. When you select the **Use main site rules** check box, the rules list will be hidden and it will use the rules from the main site. If you clear the check box, your SCM site settings will appear again.
174+
In addition to being able to control access to your app, you can restrict access to the SCM (Advanced tool) site that's used by your app. The SCM site is both the web deploy endpoint and the Kudu console. You can assign access restrictions to the SCM site from the app separately or use the same set of restrictions for both the app and the SCM site. When you select the **Use main site rules** check box, the rules list will be hidden, and it will use the rules from the main site. If you clear the check box, your SCM site settings will appear again.
175175

176176
:::image type="content" source="media/app-service-ip-restrictions/access-restrictions-advancedtools-browse.png" alt-text="Screenshot of the 'Access Restrictions' page in the Azure portal, showing that no access restrictions are set for the SCM site or the app.":::
177177

178178
### Restrict access to a specific Azure Front Door instance
179-
Traffic from Azure Front Door to your application originates from a well known set of IP ranges defined in the AzureFrontDoor.Backend service tag. Using a service tag restriction rule, you can restrict traffic to only originate from Azure Front Door. To ensure traffic only originates from your specific instance, you will need to further filter the incoming requests based on the unique http header that Azure Front Door sends.
179+
Traffic from Azure Front Door to your application originates from a well known set of IP ranges defined in the AzureFrontDoor.Backend service tag. Using a service tag restriction rule, you can restrict traffic to only originate from Azure Front Door. To ensure traffic only originates from your specific instance, you'll need to further filter the incoming requests based on the unique http header that Azure Front Door sends.
180180

181181
:::image type="content" source="media/app-service-ip-restrictions/access-restrictions-frontdoor.png?v2" alt-text="Screenshot of the 'Access Restrictions' page in the Azure portal, showing how to add Azure Front Door restriction.":::
182182

@@ -199,7 +199,7 @@ You can add access restrictions rules programmatically by doing one of the follo
199199

200200
### [Azure CLI](#tab/azurecli)
201201

202-
You can run the following command in the [Cloud Shell](https://shell.azure.com). For more information about *az webapp config access-restriction* command visit [this page](/cli/azure/webapp/config/access-restriction).
202+
You can run the following command in the [Cloud Shell](https://shell.azure.com). For more information about az webapp config access-restriction command, visit [this page](/cli/azure/webapp/config/access-restriction).
203203

204204
```azurecli-interactive
205205
az webapp config access-restriction add --resource-group ResourceGroup --name AppName \
@@ -208,7 +208,7 @@ You can run the following command in the [Cloud Shell](https://shell.azure.com).
208208

209209
### [PowerShell](#tab/powershell)
210210

211-
You can run the following command in the [Cloud Shell](https://shell.azure.com). For more information about *Add-AzWebAppAccessRestrictionRule* command visit [this page](/powershell/module/Az.Websites/Add-AzWebAppAccessRestrictionRule).
211+
You can run the following command in the [Cloud Shell](https://shell.azure.com). For more information about Add-AzWebAppAccessRestrictionRule command, visit [this page](/powershell/module/Az.Websites/Add-AzWebAppAccessRestrictionRule).
212212

213213
```azurepowershell-interactive
214214
Add-AzWebAppAccessRestrictionRule -ResourceGroupName "ResourceGroup" -WebAppName "AppName"
@@ -332,7 +332,7 @@ You can change *Unmatched rule action* for *Main site* programmatically by doing
332332

333333
### [Azure CLI](#tab/azurecli)
334334

335-
You can run the following command in the [Cloud Shell](https://shell.azure.com). For more information about *az resource* command visit [this page](/cli/azure/resource?view=azure-cli-latest#az-resource-update&preserve-view=true). Accepted values for `ipSecurityRestrictionsDefaultAction` are `Allow` or `Deny`.
335+
You can run the following command in the [Cloud Shell](https://shell.azure.com). For more information about az resource command, visit [this page](/cli/azure/resource?view=azure-cli-latest#az-resource-update&preserve-view=true). Accepted values for `ipSecurityRestrictionsDefaultAction` are `Allow` or `Deny`.
336336

337337
```azurecli-interactive
338338
az resource update --resource-group ResourceGroup --name AppName --resource-type "Microsoft.Web/sites" \
@@ -341,7 +341,7 @@ You can run the following command in the [Cloud Shell](https://shell.azure.com).
341341

342342
### [PowerShell](#tab/powershell)
343343

344-
You can run the following command in the [Cloud Shell](https://shell.azure.com) For more information about *Set-AzResource* command visit [this page](/powershell/module/az.resources/set-azresource). Accepted values for `ipSecurityRestrictionsDefaultAction` are `Allow` or `Deny`.
344+
You can run the following command in the [Cloud Shell](https://shell.azure.com). For more information about *Set-AzResource* command, visit [this page](/powershell/module/az.resources/set-azresource). Accepted values for `ipSecurityRestrictionsDefaultAction` are `Allow` or `Deny`.
345345

346346
```azurepowershell-interactive
347347
$Resource = Get-AzResource -ResourceType Microsoft.Web/sites -ResourceGroupName ResourceGroup -ResourceName AppName
@@ -425,7 +425,7 @@ You can change *Unmatched rule action* for *Advanced tool site* programmatically
425425

426426
### [Azure CLI](#tab/azurecli)
427427

428-
You can run the following command in the [Cloud Shell](https://shell.azure.com). For more information about *az resource* command visit [this page](/cli/azure/resource?view=azure-cli-latest#az-resource-update&preserve-view=true). Accepted values for `scmIpSecurityRestrictionsDefaultAction` are `Allow` or `Deny`.
428+
You can run the following command in the [Cloud Shell](https://shell.azure.com). For more information about az resource command, visit [this page](/cli/azure/resource?view=azure-cli-latest#az-resource-update&preserve-view=true). Accepted values for `scmIpSecurityRestrictionsDefaultAction` are `Allow` or `Deny`.
429429

430430
```azurecli-interactive
431431
az resource update --resource-group ResourceGroup --name AppName --resource-type "Microsoft.Web/sites" \
@@ -434,7 +434,7 @@ You can run the following command in the [Cloud Shell](https://shell.azure.com).
434434

435435
### [PowerShell](#tab/powershell)
436436

437-
You can run the following command in the [Cloud Shell](https://shell.azure.com). For more information about *Set-AzResource* command visit [this page](/powershell/module/az.resources/set-azresource). Accepted values for `scmIpSecurityRestrictionsDefaultAction` are `Allow` or `Deny`.
437+
You can run the following command in the [Cloud Shell](https://shell.azure.com). For more information about Set-AzResource command, visit [this page](/powershell/module/az.resources/set-azresource). Accepted values for `scmIpSecurityRestrictionsDefaultAction` are `Allow` or `Deny`.
438438

439439
```azurepowershell-interactive
440440
$Resource = Get-AzResource -ResourceType Microsoft.Web/sites -ResourceGroupName ResourceGroup -ResourceName AppName

0 commit comments

Comments
 (0)