Service Endpoints vs Private Endpoints for PaaS
30-second answer
A service endpoint is switched on per subnet (for example Microsoft.Storage). Traffic from that subnet reaches the service's public IP over the Microsoft backbone with the subnet as its identity, so the service firewall can allow just that subnet. It's free, but the service keeps a public endpoint and on-premises can't use it. A private endpoint is a NIC with a private IP in your subnet that maps to one resource and sub-resource (such as the blob service of one storage account) through Azure Private Link. It works from peered VNets and on-premises, lets you disable public access, and needs a privatelink private DNS zone (privatelink.blob.core.windows.net) linked to the VNet.
Simulate it » No Azure account neededExam objective: 4.2.4 Configure service endpoints for Azure platform as a service (PaaS). 4.2.5 Configure private endpoints for Azure PaaS. (Skills measured as of April 17, 2026)
Simulations
Feel it before you read it. No account needed, nothing leaves this page.
<strong>Service endpoint</strong>: in <strong>Networking</strong>, allow only selected networks and add <strong>vnet-paas/snet-app</strong>. The portal turns on the Microsoft.Storage endpoint on that subnet. The account keeps its public IP; traffic from the subnet just travels the Microsoft backbone.
👆 Click the glowing item in the portal to continue
Read the steps as text
- Service endpoint: in Networking, allow only selected networks and add vnet-paas/snet-app. The portal turns on the Microsoft.Storage endpoint on that subnet. The account keeps its public IP; traffic from the subnet just travels the Microsoft backbone.
- Private endpoint: switch to the Private endpoint connections tab and select + Private endpoint.
- Pick the target sub-resource. A blob endpoint doesn't cover Azure Files.
- The endpoint is a NIC in snet-pe with a private IP, for example 10.30.2.4.
- Keep Integrate with private DNS zone: Yes. Without it the name still resolves to the public IP and the endpoint goes unused.
- The zone is linked to vnet-paas and holds the A record. Now set Public network access: Disabled and only the private path works.
🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.
🖱️ Drag to rotate · scroll or pinch to zoom
Service endpoint vs private endpoint
A service endpoint sends a subnet's traffic to the service's public IP over the backbone, and the service firewall allows that subnet. A private endpoint gives the service a private IP in your VNet, and a privatelink private DNS zone makes the name resolve to it.
🤔 What happens if…
Read this tour as text
- VNets, subnets and a public IP. A virtual network is your private range in one region, split into subnets. Azure keeps 5 addresses in every subnet. A Standard public IP is static, zone-redundant where the region has zones, and closed to inbound traffic until an NSG opens it.
- Peering is not transitive. VNet peering joins two VNets over the Microsoft backbone. Each side has its own link, address spaces can't overlap, and the hub can share its VPN gateway (gateway transit). Peering never chains: spoke 1 and spoke 2 can't talk through the hub on their own.
- User-defined routes to the NVA. A route table on a subnet overrides system routes. Next hop Virtual appliance sends traffic to a firewall or NVA, which needs IP forwarding on its NIC. Longest prefix wins, and a user route beats a system route on the same prefix.
- NSGs, ASGs and effective rules. An NSG has rules checked by priority (100 to 4096, lowest first). Inbound traffic meets the subnet NSG first, then the NIC NSG, and both must allow. An application security group lets a rule say "to the web servers" instead of listing IPs.
- Azure Bastion. Azure Bastion lives in AzureBastionSubnet (/26 or larger) and opens RDP and SSH to VMs on their private IPs, from the portal over TLS 443 or with the native client on Standard and Premium. One Bastion in the hub serves peered spokes.
- Service endpoint vs private endpoint. A service endpoint sends a subnet's traffic to the service's public IP over the backbone, and the service firewall allows that subnet. A private endpoint gives the service a private IP in your VNet, and a privatelink private DNS zone makes the name resolve to it.
- Azure DNS: public and private zones. A public zone answers the internet once you delegate the domain to Azure's name servers. Alias records point at Azure resources such as a public IP. A private zone answers only VNets with a virtual network link, and can auto-register VM names.
- Standard load balancer and health probes. A load balancer spreads TCP/UDP flows from a frontend (public or internal) to a backend pool by load-balancing rules. A health probe pulls a VM out of rotation when it stops answering. Probes come from 168.63.129.16.
- Troubleshoot with Network Watcher. Network Watcher tools answer one question each. IP flow verify: which NSG rule allows or denies this flow? Next hop: where does this packet go? Connection troubleshoot: can A reach B, and if not, at which hop?
Fabrikam's app VMs must reach a storage account without the public internet, and admins must reach the VMs without public IPs. Compare a service endpoint with a private endpoint, see why a private endpoint without private DNS does nothing, and stand up Azure Bastion (after a subnet that's too small).
🎓 Education-only simulation. Your lab is saved in this browser, so you can leave and continue later.
😟 THE PROBLEM
The storage account is reachable from the whole internet just so one app subnet can use it.
😊 THE SOLUTION
Lock the account to the subnet with a service endpoint, or give it a private IP with a private endpoint.
- Open public endpoint✓ Firewall allows only your subnet
- On-premises needs access too✓ Private endpoint over VPN
- Name still resolves public✓ privatelink private DNS zone
Start with a question
Is a staff-only lane at the airport the same as having your own gate inside the building?
A staff lane still leads to the public terminal, but only people with a staff badge get through it. Your own gate is a door inside your office that opens straight onto the plane.
A service endpoint is the staff lane: your subnet reaches the storage account’s public address, and the account’s firewall lets in only your subnet. A private endpoint is your own gate: the account gets a private address inside your network, so you can close the public terminal completely.
Explain it like I’m 10
The technical explanation
Service endpoints
Enable a service endpoint on a subnet for a service such as Microsoft.Storage, Microsoft.Sql, Microsoft.KeyVault or Microsoft.Web. Then:
- Traffic from the subnet to that service takes the Microsoft backbone, and Azure adds a route with next hop VirtualNetworkServiceEndpoint.
- The service sees the traffic coming from your subnet (private source IP), so you add a virtual network rule in its firewall and set the default action to deny.
- The service’s endpoint is still public, and on-premises traffic can’t use the endpoint.
- It’s free. A service endpoint policy can limit Microsoft.Storage to named storage accounts.
az network vnet subnet update -g rg-net-paas --vnet-name vnet-paas -n snet-app --service-endpoints Microsoft.Storage
az storage account network-rule add -g rg-net-paas --account-name stfabrikampaas01 --vnet-name vnet-paas --subnet snet-app
az storage account update -g rg-net-paas -n stfabrikampaas01 --default-action Deny
Portal: storage account → Networking → Firewalls and virtual networks → Enabled from selected virtual networks and IP addresses → + Add existing virtual network. The portal enables the endpoint on the subnet for you.
Private endpoints
A private endpoint is a NIC in your subnet with a private IP (for example 10.30.2.4) that connects through Azure Private Link to one resource and one target sub-resource (blob, file, queue, table, dfs, web for storage; sqlServer for SQL; vault for Key Vault). Then:
- Clients in the VNet, peered VNets and on-premises (over VPN or ExpressRoute) reach the resource on that private IP.
- You can set the resource’s public network access to Disabled.
- Cost is about $0.01 an hour per endpoint plus per GB processed (illustrative).
DNS makes or breaks it
When a private endpoint exists, public DNS answers stfabrikampaas01.blob.core.windows.net with a CNAME to stfabrikampaas01.privatelink.blob.core.windows.net. If your VNet has a private DNS zone privatelink.blob.core.windows.net linked to it, with an A record for the account, the name resolves to the private IP. Without that zone or link, it resolves to the public IP, and if public access is off, connections fail.
The portal’s Integrate with private DNS zone: Yes creates the zone, the VNet link and a DNS zone group that keeps the A record updated.
az network private-endpoint create -g rg-net-paas -n pe-stfabrikam-blob --vnet-name vnet-paas --subnet snet-pe \
--private-connection-resource-id <storage-account-id> --group-id blob --connection-name stfabrikam-blob
az network private-dns zone create -g rg-net-paas -n privatelink.blob.core.windows.net
az network private-dns link vnet create -g rg-net-paas -n link-vnet-paas \
--zone-name privatelink.blob.core.windows.net --virtual-network vnet-paas --registration-enabled false
az network private-endpoint dns-zone-group create -g rg-net-paas --endpoint-name pe-stfabrikam-blob \
-n default --private-dns-zone privatelink.blob.core.windows.net --zone-name blob
nslookup stfabrikampaas01.blob.core.windows.net
Side by side
| Service endpoint | Private endpoint | |
|---|---|---|
| Service address | Public | Private IP in your subnet |
| Works from on-premises | No | Yes |
| Scope | Whole service (policy can narrow storage) | One resource and sub-resource |
| DNS change | None | privatelink zone |
| Disable public access | No | Yes |
| Cost | Free | Per hour + per GB |
Architect level Network policies for private endpoints
By default, NSGs and UDRs on a subnet don’t apply to private endpoints in it. You can turn on private endpoint network policies on the subnet (--private-endpoint-network-policies Enabled), after which NSG rules and route tables affect traffic to the endpoints. That’s how you force private endpoint traffic through a firewall.
Real-world business scenario
Tailwind Traders (fictional)
- The problem
- Order exports sat in a storage account open to the internet so both the Azure app and the on-premises ERP could reach it. A misconfigured SAS token was found on a public forum.
- What they used
- A blob private endpoint in the hub, the privatelink.blob.core.windows.net zone linked to the hub and spokes, on-premises DNS forwarding to Azure DNS Private Resolver, and public network access set to Disabled on the account.
- Why that choice
- Both the app and the ERP reach the account on a private IP over peering and ExpressRoute, and nothing on the internet can reach it, token or not.
- The result
- The account disappeared from the internet, and the leaked token was useless from outside the network.
When to use it and when not to
✓ Use it when…
- Service endpoints for a quick, free lock-down of PaaS to specific Azure subnets.
- Private endpoints when on-premises or peered networks need private access.
- Private endpoints when public network access must be disabled completely.
✕ Think twice when…
- Private endpoints without a plan for DNS.
- Service endpoints when traffic comes from on-premises.
- Assuming one private endpoint covers every sub-resource of a storage account.
↔ Alternatives to consider
- Storage firewall IP rules for a few known public client IPs.
- Azure DNS Private Resolver so on-premises DNS can resolve privatelink zones.
- Service endpoint policies to stop data going to storage accounts you don't own.
Test yourself with exercises
5 original practice questions in the AZ-104 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.
Interview preparation
Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.
Beginner What's the main difference between a service endpoint and a private endpoint?
Model answer
With a service endpoint the storage account still has its public IP; my subnet just reaches it over Microsoft's network and the account's firewall can allow my subnet. With a private endpoint the storage account gets a private IP inside my VNet, so traffic never goes to a public address and I can turn public access off.
Intermediate You created a private endpoint but the app still connects to the public IP. Why?
Model answer
DNS. The storage name has to resolve to the private IP, which needs the privatelink.blob.core.windows.net private DNS zone with an A record for the account, linked to the VNet the app runs in. Usually you let the portal integrate the zone, or add a DNS zone group to the endpoint.
Experienced developer On-premises servers must reach a storage account over ExpressRoute without the internet. Which option and what else is needed?
Model answer
A private endpoint, because service endpoints only work from Azure subnets. On-premises DNS must resolve the account name to the private IP, typically by forwarding the zone to Azure DNS Private Resolver in the hub, which uses the linked privatelink zone.
Scenario Security wants the app subnet to reach only the company's storage accounts, not any storage account in Azure. What can you do?
Model answer
With service endpoints, add a service endpoint policy on the subnet that lists the allowed accounts. With private endpoints it's naturally scoped, because each endpoint maps to one specific account, and I can block outbound to the Storage service tag in the NSG.
Quick revision
Key points
- Service endpoint - per subnet, free, service keeps its public IP, firewall allows the subnet.
- Service endpoints don't work from on-premises.
- Private endpoint - private IP NIC for one resource + sub-resource, through Private Link.
- Private endpoints work from peered VNets and on-premises, and allow public access to be disabled.
- Private endpoints need a privatelink private DNS zone linked to the VNet.
Important terminology
- Service endpoint
- A subnet setting that sends traffic for an Azure service over the Microsoft backbone and identifies the subnet to the service's firewall.
- Virtual network rule
- A storage account (or SQL, Key Vault…) firewall entry that allows traffic from a specific subnet with a service endpoint.
- Service endpoint policy
- A policy on a subnet that limits a Microsoft.Storage service endpoint to specific storage accounts, to reduce data exfiltration.
- Private endpoint
- A network interface with a private IP in your VNet that connects privately to one Azure resource through Private Link.
- Target sub-resource
- The part of a service a private endpoint maps to, such as blob, file, queue, table, dfs or web for a storage account.
- privatelink DNS zone
- A private DNS zone such as privatelink.blob.core.windows.net that resolves the resource's name to the private endpoint's IP.
Common mistakes
- Creating a private endpoint without private DNS, so names still resolve publicly.
- Expecting a blob private endpoint to cover Azure Files too.
- Choosing a service endpoint when on-premises clients need access.
Exam tips
- "From on-premises without the internet" = private endpoint.
- "Allow only Subnet1 through the storage firewall" = service endpoint + virtual network rule.
- "Resolves to a public IP after creating a private endpoint" = fix the private DNS zone / VNet link.
Five quick revision questions
-
1.Where do you enable a service endpoint?Show
On the subnet.
-
2.What does a private endpoint create in your subnet?Show
A network interface with a private IP.
-
3.Which DNS zone does a blob private endpoint use?Show
privatelink.blob.core.windows.net.
-
4.Do service endpoints cost extra?Show
No, they're free.
-
5.Can a private endpoint be used from a peered VNet?Show
Yes, if that VNet resolves the privatelink zone.
Official references
Finished this lesson? Tick it off. Your progress is saved in this browser.
Next up: Azure DNS: Public and Private Zones and Records
Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges.