A service endpoint-based access restriction rule limits inbound access to an Azure App Service workload by allowing requests originating from a specified virtual network subnet. It avoids dependence on changing remote IP addresses, but it is not supported for apps hosted in an App Service Environment. section 4.5.2
Configure the restriction with Azure CLI:
- Assign a priority because rules are evaluated from the lowest priority value; unmatched traffic is implicitly denied. section 4.5.2
Allow traffic from VMSubnet
For ContosoWebApp001, an Allow Subnet Traffic rule with priority 200 targets VMSubnet in Contoso-VNet1. The resulting configuration records the subnet resource ID and leaves the IP address field empty.
