Study guide
7.1 Virtual Network Service Endpoints & Policies
Designing and Implementing Microsoft Azure Networking Solutions AZ-700
Track your progress as you read
Finished sections get a check mark.
1 Introduction & AZ-700 Exam Overview
0.1 About the AZ-700 Exam: Format, Scoring & Skills Measured
2 Chapter 1: Azure Virtual Networks, Addressing & Subnet Architecture
1.1 VNet Planning, IP Addressing & Subnet Design 1.2 Virtual Network Peering & Global Peering 1.3 Azure NAT Gateway & Outbound Connectivity 1.4 Azure Virtual Network Manager (AVNM) & Network Groups 1.5 Public IP Addresses, Public IP Prefixes & Custom IP Prefixes (BYOIP)
3 Chapter 2: Azure Name Resolution & Core Routing
2.1 Azure DNS & Private DNS Zones 2.2 Azure Private DNS Resolver & Hybrid Name Resolution 2.3 System Routes & User-Defined Routes (UDR) 2.4 BGP & Custom Route Propagation 2.5 Azure Route Server & Dynamic NVA Route Exchange
4 Chapter 3: Hybrid Connectivity with Azure VPN Gateway
3.1 Azure VPN Gateway Architecture & SKUs 3.2 Site-to-Site (S2S) VPN & High Availability 3.3 Point-to-Site (P2S) VPN & Client Authentication 3.4 Azure Extended Network, Always On VPN & Azure Network Adapter
5 Chapter 4: Azure ExpressRoute & Virtual WAN
4.1 Azure ExpressRoute Architecture & Peering Models 4.2 ExpressRoute Routing, Resiliency & Global Reach 4.3 Azure Virtual WAN Architecture & Hub Routing 4.4 ExpressRoute BFD, Monitoring & Connection Troubleshooting
6 Chapter 5: Regional Load Balancing & Application Gateway
5.1 Azure Load Balancer Architecture & Rules 5.2 Azure Application Gateway Architecture & Routing 5.3 Web Application Firewall (WAF) on Application Gateway 5.4 Inbound NAT Rules, Port Forwarding & Health Probe Design
7 Chapter 6: Global Traffic Management & Azure Front Door
6.1 Azure Front Door Architecture & Routing 6.2 Azure Traffic Manager & DNS Load Balancing 6.3 Load Balancing Decision Matrix & Multi-Tier Design 6.4 Web Application Firewall on Azure Front Door
8 Chapter 7: Azure Private Link & Service Endpoints
7.1 Virtual Network Service Endpoints & Policies 7.2 Azure Private Endpoints & Private Link Architecture 7.3 Private Endpoint DNS Integration & Hybrid Resolution 7.4 Azure Private Link Service for Multi-Tenant Solutions
9 Chapter 8: Network Security Groups & Azure Bastion
8.1 Network Security Groups (NSGs) & Application Security Groups (ASGs) 8.2 Azure Bastion Architecture & Secure Remote Access 8.3 Azure Virtual Network Manager Security Admin Rules
10 Chapter 9: Azure Firewall & Security Policies
9.1 Azure Firewall Architecture & Rule Processing 9.2 Azure Firewall Manager & DDoS Protection
11 Chapter 10: Azure Network Observability & Troubleshooting
10.1 Network Watcher Diagnostic Tools 10.2 NSG Flow Logs, VNet Flow Logs & Traffic Analytics 10.3 Network Troubleshooting Scenarios & End-to-End Connectivity 10.4 Azure Monitor Network Insights & Defender for Cloud Network Posture
7.1 Virtual Network Service Endpoints & Policies
Key Takeaways Explain This Topic AI
Virtual Network Service Endpoints provide secure, direct connectivity to Azure PaaS services over the Microsoft Azure backbone by automatically injecting system routes (Next Hop: VirtualNetworkServiceEndpoint) into the subnet routing table.
Enabling Service Endpoints allows PaaS firewalls to restrict inbound access strictly to designated Virtual Network subnets using resource ID ACLs, while altering packet source IP from public SNAT IPs to private subnet IPs.
Service Endpoint Policies (SEP) mitigate data exfiltration risks by constraining outbound traffic from a subnet to specific, authorized Azure Storage accounts, resource groups, or subscriptions rather than allowing unrestricted access to any public storage endpoint.
Service Endpoints do not support transitive routing from on-premises networks across Site-to-Site VPN or ExpressRoute; hybrid on-premises traffic cannot traverse an Azure Virtual Network Gateway to reach PaaS services secured with Service Endpoints.
Specific system routes for Service Endpoints automatically override broader default routes (0.0.0.0/0), sending PaaS traffic directly across the Azure backbone rather than steering through on-premises or virtual appliance firewalls unless explicitly overridden.
Last updated: August 2026
Virtual Network Service Endpoints & Policies
Securing enterprise access to Azure Platform-as-a-Service (PaaS) resources requires establishing perimeter controls that isolate critical data stores and application backends from the public internet. Historically, Azure PaaS services—such as Azure Storage, Azure SQL Database, Azure Key Vault, and Azure Cosmos DB—were exposed exclusively via public IP addresses and accessible over the public internet.
Azure Virtual Network (VNet) Service Endpoints provide direct, secure connectivity to Azure PaaS services over the optimized Microsoft Azure backbone network. By extending a virtual network's private IP identity to PaaS services, Service Endpoints allow network engineers to lock down PaaS firewalls strictly to authorized subnets, shutting down access from arbitrary internet clients.
1. Service Endpoints Architecture & Packet Routing Mechanics
When a VNet Service Endpoint is enabled on a subnet for a supported Azure service (e.g., Microsoft.Storage or Microsoft.Sql ), Azure dynamically modifies the routing and identity of traffic originating from that subnet destined for the service's public IP ranges. +-----------------------------------------------------------------------------+
- | SERVICE ENDPOINT PACKET ROUTING MECHANICS |
- | |
- | WITHOUT SERVICE ENDPOINTS: |
- | [VM: 10.1.0.4] --(Outbound SNAT / Public IP)--> [Public Internet] |
- | | |
- | v |
- | [Azure Storage Public IP] |
- | (PaaS Firewall Open/Public) |
- | |
- | WITH SERVICE ENDPOINTS ENABLED ON SUBNET: |
- | [VM: 10.1.0.4] --(Direct Microsoft Backbone Route)-----------------------> |
- | - Route: VirtualNetworkServiceEndpoint |
- | - Source IP Preserved: 10.1.0.4 |
- | - Next Hop: Azure Internal Backbone |
- | | |
- | v |
- | [Azure Storage Public IP] |
- | (PaaS Firewall: ACL Subnet) |
- +-----------------------------------------------------------------------------+
- System Route Injection ( VirtualNetworkServiceEndpoint )
Enabling a Service Endpoint on a subnet triggers the Azure Software-Defined Networking (SDN) fabric to inject specialized system routes into the subnet's effective route table:
Route Destination: The destination prefix represents the regional or global public IP CIDR ranges of the target Azure PaaS service (e.g., Microsoft.Storage.EastUS or Microsoft.Sql ).
Next Hop Type: The next hop is set to VirtualNetworkServiceEndpoint .
Longest Prefix Match Precedence: Because the injected PaaS route prefixes are specific public IP ranges (e.g., 20.150.0.0/17 ), they take precedence over broader routes such as 0.0.0.0/0 (Internet or Network Virtual Appliance).
Source IP Identity Shift
When an application on a Virtual Machine (e.g., 10.1.0.4 ) communicates with a PaaS resource over a Service Endpoint:
The destination IP address remains the public IP address of the PaaS service (e.g., resolved via public DNS for mystorage.blob.core.windows.net ).
The packet does not undergo Source Network Address Translation (SNAT) to a public IP address or NAT Gateway IP.
The underlying Azure physical network encapsulates the packet and presents the private IP address ( 10.1.0.4 ) and the Subnet Resource ID directly to the PaaS service firewall.
Important
DNS and Public IP Retention: Service Endpoints do not allocate a private IP to the PaaS resource. The PaaS resource retains its fully qualified domain name (FQDN) and public IP address. Service Endpoints change the egress routing path and source identity verification on the Azure backbone, not the PaaS destination IP.
Loading diagram... VNet Service Endpoints Architecture and Access Control Flow
2. PaaS Firewall ACLs, Service Tags & System Route Precedence
To lock down PaaS infrastructure using Service Endpoints, administrators configure two interconnected components: enabling the endpoint on the subnet, and configuring the PaaS service firewall.
Configuring PaaS Firewall Virtual Network Rules
Once the Service Endpoint is enabled on a subnet, the PaaS service (e.g., Azure Storage Account or Azure SQL Server) can be configured with Virtual Network firewall rules:
Navigate to the PaaS resource's Networking / Firewalls and virtual networks blade.
Set Public network access to Enabled from selected virtual networks and IP addresses .
Add the specific Subnet Resource ID under Virtual networks .
Optionally allow trusted Microsoft first-party services (e.g., Azure Backup, Azure Monitor) via exception flags. +-----------------------------------------------------------------------------+
- | PAAS FIREWALL CONFIGURATION PATTERN |
- | |
- | Azure Storage Account / SQL Server: |
- | - Public network access: Selected networks |
- | - Allowed Virtual Networks: |
- | * Subscription: Sub-Prod-01 |
- | * VNet: VNet-Core-EastUS |
- | * Subnet: Subnet-AppTier (Microsoft.Storage enabled) |
- | - Firewall IP Allowlist: (Optional corporate egress public CIDRs) |
- | - Exceptions: Allow Azure services on the trusted services list |
- +-----------------------------------------------------------------------------+
- Service Tags in Network Security Groups (NSGs)
When restricting outbound traffic from a subnet using Network Security Groups, you can use Service Tags to simplify rule creation without managing changing IP address lists.
Service Tag Scope & Description
Microsoft.Storage Represents all Azure Storage public IP prefixes globally.
Microsoft.Storage.EastUS Regional tag representing Storage IP ranges within the East US region.
Microsoft.Sql Represents Azure SQL Database, SQL Managed Instance, and Synapse Analytics.
Microsoft.KeyVault Represents Azure Key Vault endpoints.
Microsoft.AzureCosmosDB Represents Azure Cosmos DB database endpoints.
Microsoft.ContainerRegistry Represents Azure Container Registry (ACR) service endpoints.
Interaction Between Service Endpoints and User-Defined Routes (UDRs)
Network administrators frequently deploy a default route ( 0.0.0.0/0 -> Next Hop: VirtualAppliance ) on subnets to force all outbound internet traffic through an Azure Firewall or third-party Network Virtual Appliance (NVA) for deep packet inspection. +-----------------------------------------------------------------------------+
- | UDR VS. SERVICE ENDPOINT ROUTE PRECEDENCE |
- | |
- | Route Table on Subnet: |
- | 1. User-Defined Route (UDR): 0.0.0.0/0 -> Next Hop: 10.1.0.100 (NVA) |
- | 2. Injected System Route: 20.150.0.0/17 (Storage) -> Next Hop: |
- | VirtualNetworkServiceEndpoint |
- | |
- | RESULT: |
- | Storage traffic matches the more specific /17 prefix and bypasses the |
- | NVA, flowing DIRECTLY over the Microsoft backbone. |
- | Non-storage internet traffic matches 0.0.0.0/0 and routes to the NVA. |
- +-----------------------------------------------------------------------------+
If corporate security policy mandates that all PaaS traffic must pass through an NVA, administrators must either:
Remove the Service Endpoint from the subnet and inspect public PaaS traffic through the NVA, or
Deploy Azure Private Endpoints instead.
3. Service Endpoint Policies for Azure Storage
While VNet Service Endpoints secure PaaS services against external internet attackers, they introduce a subtle internal security vulnerability: Data Exfiltration .
The Data Exfiltration Problem with Standard Service Endpoints
When you enable Microsoft.Storage as a Service Endpoint on a subnet, Azure allows workloads on that subnet to route traffic across the Microsoft backbone to any Azure Storage Account in the world—including storage accounts in other subscriptions, other organizations, or an attacker's personal Azure tenant. +-----------------------------------------------------------------------------+
- | DATA EXFILTRATION RISK WITH SERVICE ENDPOINTS |
- | |
- | [Compromised VM in Subnet] |
- | | |
- | |--- (Legitimate Traffic) ----> [Corporate Storage: corpdata.blob...] |
- | | (Allowed by PaaS Firewall) |
- | | |
- | +--- (EXFILTRATION ATTACK) ---> [Attacker Storage: rogue.blob...] |
- | (ALLOWED by default Service Endpoint)|
- | (Transfers company secrets out!) |
- +-----------------------------------------------------------------------------+
- Service Endpoint Policies (SEP) Architecture
Service Endpoint Policies (SEP) allow organizations to filter and restrict outbound Service Endpoint traffic originating from a subnet to specific, authorized Azure Storage accounts. +-----------------------------------------------------------------------------+
- | SERVICE ENDPOINT POLICY RESTRICTION SCOPES |
- | |
- | Scope Level Resource ID Format |
- | -------------------- ------------------------------------------------ |
- | Specific Account /subscriptions/{subId}/resourceGroups/{rgName}/ |
- | providers/Microsoft.Storage/storageAccounts/{name} |
- | |
- | All Accounts in RG /subscriptions/{subId}/resourceGroups/{rgName} |
- | |
- | All Accounts in Sub /subscriptions/{subId} |
- | |
- | All Accounts in Tenant /tenants/{tenantId} |
- +-----------------------------------------------------------------------------+
How Service Endpoint Policies Operate:
Resource Association: A Service Endpoint Policy is created and linked directly to the target subnet where the Microsoft.Storage Service Endpoint is active.
Policy Definition: The policy contains one or more policy definitions specifying allowed Service Endpoint Policy Definitions (e.g., Microsoft.Storage/accounts or Microsoft.Storage/accounts/table ).
Strict Whitelisting: Once applied, any outbound request to a storage account not explicitly defined in the policy is immediately dropped by the Azure SDN fabric before leaving the subnet, returning an HTTP 403 Forbidden / network timeout to the client.
Note
Service Endpoint Policy Scope Limitation: As of current Azure networking specifications, Service Endpoint Policies are supported exclusively for Azure Storage services (Blobs, Tables, Queues, Files, and Azure Data Lake Storage Gen2). They are not available for Azure SQL Database, Key Vault, or Cosmos DB.
4. Key Limitations, Hybrid Routing Constraints & Design Matrix
While Service Endpoints offer simple implementation and zero additional service cost, they have fundamental architectural constraints that influence network design.
1. No Transitive Hybrid Connectivity (VPN / ExpressRoute)
Traffic originating from an on-premises network connected to Azure via Site-to-Site (S2S) VPN, Point-to-Site (P2S) VPN, or ExpressRoute cannot access PaaS resources over a Service Endpoint enabled on an Azure VNet.
Azure Virtual Network Gateways do not perform gateway transit for Service Endpoints.
If an on-premises client attempts to access a PaaS service whose firewall is locked down to a VNet subnet, the on-premises traffic arrives with the on-premises public egress IP and is rejected by the PaaS firewall.
2. Multi-Region and Global Service Endpoint Scope
Service Endpoints are generally regional in nature:
Enabling Microsoft.Storage on a subnet in East US optimizes traffic to Storage Accounts in East US and paired regions ( West US ).
Cross-region access to other remote regions (e.g., North Europe ) may route over standard Azure public IP infrastructure unless regional service endpoint policies or cross-region service tags are configured.
3. Service Endpoints vs. Private Endpoints Quick Comparison
- Design Dimension Virtual Network Service Endpoints Azure Private Endpoints
- IP Address Model Public IP retained on PaaS resource Dedicated Private IP allocated from customer subnet
- Routing Mechanism VirtualNetworkServiceEndpoint system route Standard VNet local IP routing (NIC in subnet)
On-Premises Hybrid Access No (Cannot traverse VPN / ExpressRoute) Yes (Seamless private IP routing over VPN/ER)
Data Exfiltration Control Requires Service Endpoint Policies (Storage only) Inherent (Tied strictly to specific resource instance)
- Service Cost Free (No additional charge) Hourly fee per endpoint + per-GB data processing fees
- DNS Requirement Standard Public DNS Private DNS Zones / Conditional Forwarding required