Private endpoint DNS problems

Nearly every private endpoint DNS ticket comes down to the same root cause: the app resolves the service’s name to its public IP instead of the private endpoint’s IP. The private endpoint is healthy and the network is fine, yet the app still gets a 403 or a timeout, because it never went down the private path at all.

A private endpoint doesn’t change the name you use. mystorage.blob.core.windows.net stays exactly as it was, and DNS is meant to hand back the private IP to clients inside your network, so if any link in that DNS chain is missing, clients quietly fall back to the public answer.

In the lab you’ll build a storage account that can only be reached through a private endpoint, prove from a VM that the name resolves privately, and then break the DNS chain twice, first by unlinking the private DNS zone and then with a custom DNS server.

TimeYou needCostBy the end you can
About 50 minutesA free account, the CLI and PowerShellAround 5 US cents: a small VM, a public IP for its outbound access, a private endpoint and a storage account for an hourFollow how a private endpoint name resolves, and fix private DNS zone links and custom DNS settings

What it is, in one line

A private endpoint only works if DNS returns its private IP for the service’s normal name to every client that’s supposed to use it.

In Simple Words

The shop with a back door for staff

A big store has a public front door on the main road and a private back door for staff, and both lead into the same store. Staff are told, “If you ask the security desk for the store’s address, they’ll give you the back door.”

Now a new staff member asks a stranger on the street instead of the security desk. The stranger gives the front door address, so the new person walks round to the front, finds it locked to non-customers and decides the store must be closed.

In this story the private DNS zone is the security desk, the private endpoint is the back door, and a custom DNS server that doesn’t know the zone is that stranger on the street.

Engineer's View

How private endpoint DNS works

  • The CNAME: as soon as a private endpoint exists, public DNS answers mystorage.blob.core.windows.net with a CNAME to mystorage.privatelink.blob.core.windows.net, and publicly that name resolves to the public IP.
  • The private zone: a private DNS zone named privatelink.blob.core.windows.net holds an A record for mystorage that points to the private endpoint’s IP, and a DNS zone group on the endpoint keeps that record current.
  • The link: the zone only answers for VNets that are linked to it, so a VM in an unlinked VNet gets the public answer.
  • Azure DNS (168.63.129.16): the default resolver for VMs, and it looks at linked private zones first. Custom DNS servers have to forward privatelink zones to it, normally through Azure DNS Private Resolver.
  • On-premises: your on-premises DNS needs a conditional forwarder that sends the privatelink zones to a Private Resolver inbound endpoint.
  • Each service has its own zone: blob, file, queue, table, dfs, vault, database and the rest each use a different privatelink zone name.

How it works, step by step

Here’s what happens when vm-app resolves the storage name and everything is set up correctly:

Private endpoint DNS: how the storage name resolves to a private IP
  1. vm-app asks 168.63.129.16 for stl65xxxxx.blob.core.windows.net.
  2. Public DNS returns a CNAME to stl65xxxxx.privatelink.blob.core.windows.net.
  3. Azure DNS sees that vnet-l65 is linked to the private zone privatelink.blob.core.windows.net and answers from that zone with 10.65.2.4.
  4. The VM connects over the VNet to 10.65.2.4, the private endpoint’s NIC. The TLS certificate still matches, because the name never changed.
  5. The storage account has public network access disabled, but it accepts the request because it came in through its private endpoint.

Take away any link in that chain and step 3 returns the public IP. The request then goes to the public endpoint, where public access is disabled, and fails with 403.

Where the private endpoint DNS chain breaks

That’s why the first command on any private endpoint ticket should be a DNS lookup from the client that’s failing, not from your laptop and not from the portal.

Build a private-only storage account and prove its DNS

Before you run any command, double-check it

Read every command twice before you press Enter. Check the target: the system or account, the IDs, the names and the sizes. These commands are for learning and were tested in our lab, not on your system. At work, run the read-only list commands first, follow your change process, make sure a backup exists, and ask a second person to check anything that changes or deletes data. You run them at your own risk.

1Network, VM and a storage account

Create the VNet with an app subnet and an endpoint subnet, a VM with a managed identity, and a storage account holding one blob:

$sfx = Get-Random -Minimum 10000 -Maximum 99999
$st = "stl65$sfx"
az group create --name rg-saat-l65 --location centralindia --tags course=saatvedha-azure lesson=65 -o none
az network vnet create --resource-group rg-saat-l65 --name vnet-l65 --address-prefixes 10.65.0.0/16 --subnet-name snet-app --subnet-prefixes 10.65.1.0/24 -o none
az network vnet subnet create --resource-group rg-saat-l65 --vnet-name vnet-l65 --name snet-pe --address-prefixes 10.65.2.0/24 -o none
az vm create --resource-group rg-saat-l65 --name vm-app --image Canonical:ubuntu-24_04-lts:server:latest --size Standard_B1s --vnet-name vnet-l65 --subnet snet-app --public-ip-sku Standard --nsg-rule NONE --assign-identity --admin-username azureuser --generate-ssh-keys --tags course=saatvedha-azure lesson=65 -o none
az storage account create --resource-group rg-saat-l65 --name $st --sku Standard_LRS --min-tls-version TLS1_2 --allow-blob-public-access false -o none
$stId = az storage account show --resource-group rg-saat-l65 --name $st --query id -o tsv
$me = az ad signed-in-user show --query id -o tsv
az role assignment create --assignee-object-id $me --assignee-principal-type User --role "Storage Blob Data Contributor" --scope $stId -o none
$vmPid = az vm show --resource-group rg-saat-l65 --name vm-app --query identity.principalId -o tsv
az role assignment create --assignee-object-id $vmPid --assignee-principal-type ServicePrincipal --role "Storage Blob Data Reader" --scope $stId -o none

Give the roles two minutes, upload a blob from your laptop, and then close the public door:

az storage container create --account-name $st --name lab --auth-mode login -o none
az storage blob upload --account-name $st --container-name lab --name hello.txt --data "hello through the back door" --auth-mode login -o none
az storage account update --resource-group rg-saat-l65 --name $st --public-network-access Disabled -o none

2The private endpoint and its DNS

Create the endpoint, the private zone, the VNet link and the zone group that writes the A record:

az network private-endpoint create --resource-group rg-saat-l65 --name pe-blob --vnet-name vnet-l65 --subnet snet-pe --private-connection-resource-id $stId --group-id blob --connection-name pe-blob-conn -o none
az network private-dns zone create --resource-group rg-saat-l65 --name privatelink.blob.core.windows.net -o none
az network private-dns link vnet create --resource-group rg-saat-l65 --zone-name privatelink.blob.core.windows.net --name link-l65 --virtual-network vnet-l65 --registration-enabled false -o none
az network private-endpoint dns-zone-group create --resource-group rg-saat-l65 --endpoint-name pe-blob --name default --private-dns-zone privatelink.blob.core.windows.net --zone-name blob -o none
az network private-dns record-set a list --resource-group rg-saat-l65 --zone-name privatelink.blob.core.windows.net --query "[].{name:name, ip:aRecords[0].ipv4Address}" -o table

You should see something like this:

Name        Ip
----------  ---------
stl6512345  10.65.2.4

3Prove it from the VM

Save this as C:\azure-lab\pe\check-blob.sh. STNAME gets replaced before each run:

#!/bin/bash
# Resolve the blob endpoint and list the lab container with the VM's managed identity
ST=STNAME
getent hosts $ST.blob.core.windows.net
TOKEN=$(curl -s -H Metadata:true 'http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://storage.azure.com/' | python3 -c 'import sys,json; print(json.load(sys.stdin)["access_token"])')
curl -s -H "Authorization: Bearer $TOKEN" -H 'x-ms-version: 2021-08-06' "https://$ST.blob.core.windows.net/lab?restype=container&comp=list" | grep -o -E '<Name>[^<]+|<Code>[^<]+'

Run it:

(Get-Content C:\azure-lab\pe\check-blob.sh -Raw) -replace 'STNAME', $st | Set-Content C:\azure-lab\pe\check-now.sh
az vm run-command invoke --resource-group rg-saat-l65 --name vm-app --command-id RunShellScript --scripts '@C:\azure-lab\pe\check-now.sh' --query "value[0].message" -o tsv

You should see something like this:

[stdout]
10.65.2.4       stl6512345.privatelink.blob.core.windows.net stl6512345.blob.core.windows.net
<Name>hello.txt

The normal blob name resolves to 10.65.2.4 through the privatelink CNAME, and the VM lists the container using its managed identity, even with public access disabled.

Private endpoint DNS configuration showing the private IP
pe-blob DNS configuration: the storage name maps to 10.65.2.4.
Storage name resolving to the private endpoint IP from a VM
Normal name, private IP, and the request is accepted.

✅ Checkpoint: vm-app resolves the storage name to the private endpoint and reads the container, and public network access is disabled.

Break It, Then Fix It

Leave everything running, since both breaks use it.

1Break it: the zone isn’t linked to this VNet

In real companies the private zone usually sits in a central hub subscription, and new spokes often get forgotten. Simulate a VNet that hasn’t been linked:

az network private-dns link vnet delete --resource-group rg-saat-l65 --zone-name privatelink.blob.core.windows.net --name link-l65 --yes
(Get-Content C:\azure-lab\pe\check-blob.sh -Raw) -replace 'STNAME', $st | Set-Content C:\azure-lab\pe\check-now.sh
az vm run-command invoke --resource-group rg-saat-l65 --name vm-app --command-id RunShellScript --scripts '@C:\azure-lab\pe\check-now.sh' --query "value[0].message" -o tsv

Give it a minute and you should see something like this:

[stdout]
20.x.x.x        blob.xxx.store.core.windows.net stl6512345.blob.core.windows.net
<Code>AuthorizationFailure

It’s the same name, but Azure DNS now has no linked private zone, so the public chain wins and the VM gets the public IP. The request lands on the public endpoint, where public access is disabled, and comes back with AuthorizationFailure, even though the private endpoint itself is perfectly healthy.

To fix it, link the zone to the VNet again, wait a minute and check:

az network private-dns link vnet create --resource-group rg-saat-l65 --zone-name privatelink.blob.core.windows.net --name link-l65 --virtual-network vnet-l65 --registration-enabled false -o none
(Get-Content C:\azure-lab\pe\check-blob.sh -Raw) -replace 'STNAME', $st | Set-Content C:\azure-lab\pe\check-now.sh
az vm run-command invoke --resource-group rg-saat-l65 --name vm-app --command-id RunShellScript --scripts '@C:\azure-lab\pe\check-now.sh' --query "value[0].message" -o tsv

The name resolves to 10.65.2.4 again, and the container lists hello.txt.

2Break it: a custom DNS server that doesn’t know the zone

A network team points the VNet at a public DNS resolver “for consistency”. VMs only pick up DNS settings when they renew their lease, so restart the VM:

az network vnet update --resource-group rg-saat-l65 --name vnet-l65 --dns-servers 8.8.8.8 -o none
az vm restart --resource-group rg-saat-l65 --name vm-app -o none
(Get-Content C:\azure-lab\pe\check-blob.sh -Raw) -replace 'STNAME', $st | Set-Content C:\azure-lab\pe\check-now.sh
az vm run-command invoke --resource-group rg-saat-l65 --name vm-app --command-id RunShellScript --scripts '@C:\azure-lab\pe\check-now.sh' --query "value[0].message" -o tsv

You should see something like this:

[stdout]
20.x.x.x        blob.xxx.store.core.windows.net stl6512345.blob.core.windows.net
<Code>AuthorizationFailure

The zone is still linked, but the VM has stopped asking Azure DNS. A public resolver has never heard of your private zone, so it gives back the public IP, and you get the same result with domain controllers or on-premises DNS that don’t forward privatelink zones.

To fix it, switch back to Azure-provided DNS (or, if you run your own DNS servers, forward privatelink zones to 168.63.129.16 through Azure DNS Private Resolver), restart and check:

az network vnet update --resource-group rg-saat-l65 --name vnet-l65 --set dhcpOptions.dnsServers=[] -o none
az vm restart --resource-group rg-saat-l65 --name vm-app -o none
(Get-Content C:\azure-lab\pe\check-blob.sh -Raw) -replace 'STNAME', $st | Set-Content C:\azure-lab\pe\check-now.sh
az vm run-command invoke --resource-group rg-saat-l65 --name vm-app --command-id RunShellScript --scripts '@C:\azure-lab\pe\check-now.sh' --query "value[0].message" -o tsv

The private IP is back, and so is hello.txt.

Storage name resolving to a public IP when the zone is not linked
Same name, public answer, and the request is refused.

3Clean up

Delete the lab resource group:

az group delete --name rg-saat-l65 --yes

✅ Checkpoint: Using the client’s own lookup, you found two broken links in the DNS chain and fixed both without touching the private endpoint.

This happened at work

The SQL migration that worked from Azure and failed from the office

A manufacturer moved its ERP database to Azure SQL behind a private endpoint, with public access disabled. The application servers in Azure connected without any trouble, but on Monday morning 200 office users running reports through ODBC started getting “Login failed” and connection errors.

The cause was where the office PCs got their DNS from: the on-premises domain controllers. Those servers resolved erp-sql.database.windows.net through public DNS, got the public IP and tried to reach, over the internet, a server that refused public connections. The VMs in Azure used Azure DNS with the linked privatelink zone, which is why every test from Azure had passed.

What they changed: they put an Azure DNS Private Resolver with an inbound endpoint in the hub and added conditional forwarders on the domain controllers for privatelink.database.windows.net and the other privatelink zones in use. Every private endpoint go-live now includes an nslookup from an office PC, from a VM in each spoke and from a VPN user.

Common mistakes and troubleshooting

MistakeWhat you seeWhat to do
Private zone not linked to the client VNetPublic IP returned; 403 or timeoutLink the zone to each VNet that uses the endpoint.
Custom DNS without forwardingPublic IP returnedForward privatelink zones to 168.63.129.16 through Private Resolver.
On-premises DNS not updatedWorks from Azure, fails from officeAdd conditional forwarders to a Private Resolver inbound endpoint.
Wrong zone name for the serviceRecord never foundUse the right privatelink zone for each service and sub-resource.
Testing DNS from your laptopMisleading answersTest from the client that’s failing.
Using the privatelink name in appsCertificate errorsCarry on using the normal service name.

Interview questions

Click a question to open it. Each one is phrased the way an interviewer would ask it, and underneath you’ll find why they ask it and one way you could answer in your own words.

Fresher level

1. What is a private endpoint?

Why they ask this: The basic concept.

How you might answer: It’s a NIC with a private IP in your VNet that connects to one Azure service instance over Private Link, so the traffic stays private.

2. Why does a private endpoint need DNS changes?

Why they ask this: Core idea.

How you might answer: Because apps keep using the service’s normal name, so DNS has to return the private endpoint’s IP for that name, and that comes from a privatelink private DNS zone.

3. What is 168.63.129.16?

Why they ask this: A detail every Azure admin knows.

How you might answer: It’s the Azure platform IP that, among other things, gives VMs Azure DNS, including the answers from linked private DNS zones.

2–5 years experience

4. An app gets 403 from storage even with a private endpoint. What do you check?

Why they ask this: A real troubleshooting path.

How you might answer: I’d run nslookup from the app’s machine. If it gives a public IP, I check the private zone link, the VNet’s DNS servers and forwarding. If it gives the private IP, I move on to NSGs, the endpoint connection state and RBAC.

5. How do on-premises clients resolve private endpoints?

Why they ask this: Hybrid DNS.

How you might answer: On-premises DNS forwards the privatelink zones to an Azure DNS Private Resolver inbound endpoint, and that uses Azure DNS and the linked private zones.

6. What does a DNS zone group do?

Why they ask this: Practical detail.

How you might answer: It ties the private endpoint to a private DNS zone and creates or updates the A record for you whenever the endpoint’s IP changes.

Senior level

7. How would you design private endpoint DNS for 50 spokes?

Why they ask this: They want architecture.

How you might answer: I’d keep the privatelink zones centrally in the hub subscription and link them to every spoke by policy, have Azure Policy DeployIfNotExists create the DNS zone groups, put in a Private Resolver for on-premises and custom DNS, and monitor resolution from each spoke.

8. What breaks when two teams create the same privatelink zone?

Why they ask this: A subtle failure.

How you might answer: Clients linked to the wrong copy of the zone get no record, or a stale one. You keep a single zone per name centrally and block duplicates with policy.

9. How do you migrate an app to private endpoints with no downtime?

Why they ask this: Change planning.

How you might answer: I’d create the endpoint and DNS first while public access is still on, check that clients resolve and connect privately, watch the logs for any public traffic, and only then disable public access.

Quick quiz

Q1. The VM resolves the storage name to a public IP. Most likely?

  1. Endpoint deleted
  2. Private zone not linked or not used
  3. Wrong SKU
  4. No RBAC
Show answer

B — DNS fell back to the public answer.

Q2. Which IP gives VMs Azure DNS?

  1. 10.0.0.1
  2. 168.63.129.16
  3. 8.8.8.8
  4. 169.254.169.254
Show answer

B — Azure DNS lives at 168.63.129.16.

Q3. Zone name for blob private endpoints?

  1. blob.core.windows.net
  2. privatelink.blob.core.windows.net
  3. private.blob.azure.com
  4. blob.privatelink.net
Show answer

B — Each service has its privatelink zone.

Q4. On-premises users get the public IP. Fix?

  1. Disable the endpoint
  2. Conditional forwarder to a Private Resolver
  3. Open public access
  4. Change the app name
Show answer

B — Forward privatelink zones into Azure DNS.

Q5. Which name should apps use?

  1. The privatelink name
  2. The normal service name
  3. The private IP
  4. The NIC name
Show answer

B — Certificates match the normal name.

Quick recap

You can now find the broken DNS link behind nearly any private endpoint ticket.

  • Private endpoints rely on DNS handing back the private IP.
  • The privatelink zone has to be linked to the client’s VNet.
  • Custom and on-premises DNS have to forward privatelink zones.
  • Test resolution from the client that’s failing.
  • A public IP with public access disabled means a 403 or a timeout.

Next lesson

Lesson 66: AuthorizationFailed and RBAC problems → You decode AuthorizationFailed errors: scope, role propagation, deny assignments and managed identity mistakes.

Further reading: private endpoint DNS

Want to go deeper into private endpoint DNS? See Microsoft’s Azure Private Endpoint DNS configuration and What is Azure DNS Private Resolver?. You can also see the full plan for this course on the Azure Cloud Administration course page.

Scroll to Top

This website uses cookies

We use a few cookies to keep this site working. If you allow it, we also use Google Analytics to count visits so we can improve our lessons. You can accept all, deny the optional ones, or choose what to allow.