Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

4.1.5.4. Configure Networking Settings for an App Service

4.1.5.4. Configure Networking Settings for an App Service

💡 First Principle: Every App Service networking feature controls one direction of traffic. Inbound features decide who can reach the app; outbound features decide what the app can reach. Most configuration mistakes come from using an outbound feature to solve an inbound problem, or the reverse.

Scenario: An internal HR portal runs on a Premium v3 App Service plan. Staff must reach it only from the office range and from the corporate virtual network, the build agents must still be able to deploy to it, and the app must read from a database that has no public endpoint. The security team also requires HTTPS with nothing older than TLS 1.2.

What It Is: By default every App Service app has a public entry point. App Service networking features let you filter or replace that inbound path and give the app a route into private networks for its outbound calls.

FeatureDirectionWhat it doesPlans that support it
Access restrictionsInboundPriority-ordered allow and deny list on the public endpointAll App Service-hosted workloads
Private endpointInboundGives the app a private IP address in your virtual network through Private LinkBasic, Standard, PremiumV2, PremiumV3, PremiumV4, IsolatedV2, Functions Premium
Virtual network integrationOutboundLets the app call resources in or through a virtual networkBasic, Standard, Premium (v2, v3, v4), Elastic Premium
Hybrid ConnectionsOutboundReaches one TCP host and port through Azure RelayBasic, Standard, Premium, Isolated
Inbound: Access Restrictions

Access restrictions behave like a firewall on the app's default endpoint. You find them under Settings > Networking > Public network access. Each rule has an action (Allow or Deny), a priority, and a source:

  • IPv4 or IPv6 address ranges in CIDR notation.
  • Service tag, such as AzureFrontDoor.Backend. Add an X-Azure-FDID header filter to accept only your own Front Door instance.
  • Virtual network subnet. This uses a Microsoft.Web service endpoint on that subnet; in the multitenant service, IP rules don't match virtual network ranges.

Rules are evaluated from the lowest priority number upward. As soon as one rule exists, an implicit deny-all applies to unmatched traffic unless you set the unmatched rule action explicitly, and blocked callers receive HTTP 403. An app can hold up to 512 rules. The advanced tools site (the SCM or Kudu site, which is also the Web Deploy endpoint) has its own rule list, or you can select Use main site rules. Access restrictions are never evaluated for traffic that arrives through a private endpoint.

Inbound: Private Endpoints

A private endpoint is a network interface in one of your subnets that maps to the app. It carries inbound traffic only. Public access remains open until you set Public network access to Disabled, so disable it when the app must be private. Clients must resolve the app through the privatelink.azurewebsites.net private DNS zone, with a second record for the SCM site; a private DNS zone group creates both. An app supports up to 100 private endpoints, and FTP isn't available through them.

Outbound: Virtual Network Integration and Hybrid Connections

Virtual network integration mounts the app's workers into a subnet so the app can call private resources, peered networks, and on-premises networks reached over ExpressRoute or VPN. Requirements:

  • The virtual network must be in the same region as the app.
  • The subnet must be unused and is delegated to Microsoft.Web/serverFarms. It can't be the private endpoint's subnet.
  • Size it for maximum scale, because the size can't be changed after assignment. One address is used per plan instance; /28 is the minimum for an existing subnet, the portal requires /27 when it creates one, and a /26 covers a full multitenant plan.
  • A plan can have up to two virtual network integrations; each app uses one.

Without the Outbound internet traffic (route all) setting, only private RFC 1918 traffic and service endpoint traffic enter the virtual network. With it, all outbound application traffic enters the virtual network, where the integration subnet's NSG, route table, or NAT gateway applies. Hybrid Connections are the lighter option for reaching a single on-premises TCP endpoint: a Hybrid Connection Manager on-premises connects outbound on port 443, so no VPN or inbound firewall opening is needed. It doesn't support UDP.

Transport Security

Under Configuration > General settings, HTTPS Only redirects every HTTP request to HTTPS, and Minimum Inbound TLS Version defaults to 1.2 for new apps (1.3 is supported). The SCM site has its own minimum TLS setting.

Practical Implementation: Lock Down Inbound and Route Outbound with Azure CLI
# Inbound: allow the office range on the main site (an implicit deny now applies to everything else)
az webapp config access-restriction add --resource-group rg-hr --name hr-portal \
  --rule-name office --action Allow --ip-address 203.0.113.0/24 --priority 100

# Inbound: allow the build agents on the SCM (Kudu) site only
az webapp config access-restriction add --resource-group rg-hr --name hr-portal \
  --rule-name build-agents --action Allow --ip-address 198.51.100.10/32 --priority 100 --scm-site true

# Outbound: integrate with a dedicated subnet, then send all outbound traffic through the virtual network
az webapp vnet-integration add --resource-group rg-hr --name hr-portal \
  --vnet vnet-hub --subnet snet-appsvc-integration
az resource update --resource-group rg-hr --name hr-portal --resource-type "Microsoft.Web/sites" \
  --set properties.outboundVnetRouting.allTraffic=true

# Transport security
az webapp update --resource-group rg-hr --name hr-portal --https-only true
az webapp config set --resource-group rg-hr --name hr-portal --min-tls-version 1.2
Visual: Which Feature Handles Which Direction

⚠️ Common Pitfall: Adding a single allow rule for the office and then wondering why the deployment pipeline fails. The new rule switches the unmatched action to deny for everything else, and if the SCM site is set to use the main site rules, the build agents are blocked too. Add a rule for them on the SCM site.

⚠️ Exam Trap: Virtual network integration doesn't make an app private. It only carries the app's outbound calls. If the requirement is "reachable only from the virtual network," the answer is a private endpoint with public network access disabled, not virtual network integration. Remember the reverse as well: access restrictions filter only the public endpoint, so they never block traffic that arrives through a private endpoint.

Key Trade-Offs:
  • Access restrictions vs. private endpoint: Access restrictions keep the public endpoint and filter it, which is simple and free. A private endpoint removes public exposure entirely but adds Private Link cost and private DNS that every client must resolve.
  • Route all vs. private-only routing: Routing all outbound traffic lets a firewall inspect it, but every dependency, including identity and certificate revocation endpoints, must then be allowed through that firewall.

Reflection Question: An app has a private endpoint, public network access enabled, and an access restriction that allows only the office range. Which callers can reach it, and why doesn't the access restriction list apply to all of them?

See how it connects
Alvin Varughese
Written byAlvin Varughese
Founder•22 professional certifications earned