What are Private Endpoints?
A Private Endpoint is a network interface with a private IP address from your VNet subnet. It connects your VNet to an Azure PaaS service using Azure Private Link. Once created:
- The PaaS service gets a private IP in your VNet (e.g., 10.0.1.5)
- Traffic from your VMs to the service uses this private IP
- Traffic never leaves the Microsoft network — no public internet
- You can disable the public endpoint entirely for maximum security
Azure Private Link
Azure Private Link is the underlying technology that powers Private Endpoints. It also allows you to expose your own services privately — if you have a service in your VNet, you can publish it via Private Link so other VNets or subscriptions can access it via their own Private Endpoints (without VNet peering).
DNS Integration
DNS configuration is the most complex part of Private Endpoints. When you create a Private Endpoint for a storage account:
- The storage account still has a public DNS name:
mystorageaccount.blob.core.windows.net - Without DNS config, this resolves to the public IP — traffic goes over the internet
- You need a Private DNS Zone:
privatelink.blob.core.windows.net - Add an A record in this zone:
mystorageaccount → 10.0.1.5(private IP) - Link the Private DNS Zone to your VNet
- Now VMs in the VNet resolve
mystorageaccount.blob.core.windows.netto the private IP
Private DNS Zone Names
| Service | Private DNS Zone Name |
|---|---|
| Azure Storage (Blob) | privatelink.blob.core.windows.net |
| Azure Storage (File) | privatelink.file.core.windows.net |
| Azure SQL Database | privatelink.database.windows.net |
| Azure Key Vault | privatelink.vaultcore.azure.net |
| Azure Cosmos DB | privatelink.documents.azure.com |
Supported Services
Private Endpoints are supported by a wide range of Azure services including:
- Azure Storage (Blob, File, Queue, Table, Data Lake)
- Azure SQL Database and SQL Managed Instance
- Azure Key Vault
- Azure Cosmos DB
- Azure App Service and Functions
- Azure Kubernetes Service (AKS API server)
- Azure Monitor (Log Analytics)
- Azure Event Hubs and Service Bus
Private Endpoints vs Service Endpoints
| Feature | Service Endpoints | Private Endpoints |
|---|---|---|
| Traffic path | Stays on Azure backbone but from public IP | Fully private — uses private IP |
| Service gets private IP? | No — service still has public IP only | Yes — private IP in your subnet |
| Accessible from on-premises? | No (via VNet only) | Yes (via VPN/ExpressRoute) |
| DNS changes required? | No | Yes |
| Public access can be disabled? | Via firewall rules | Yes — fully |
| Cost | Free | Per-endpoint charge (~₹500–800/month) |
| Security level | Good | Highest |
Creating a Private Endpoint
# Get storage account resource ID
STORAGE_ID=$(az storage account show \
--name mystorageaccount2026 \
--resource-group myRG \
--query id --output tsv)
# Create the private endpoint
az network private-endpoint create \
--name myStoragePrivateEndpoint \
--resource-group myRG \
--vnet-name myVNet \
--subnet app-subnet \
--private-connection-resource-id $STORAGE_ID \
--group-id blob \
--connection-name myStorageConnection
# Create Private DNS Zone
az network private-dns zone create \
--resource-group myRG \
--name privatelink.blob.core.windows.net
# Link DNS Zone to VNet
az network private-dns link vnet create \
--resource-group myRG \
--zone-name privatelink.blob.core.windows.net \
--name myDnsLink \
--virtual-network myVNet \
--registration-enabled false
Disabling Public Access
After creating a Private Endpoint, disable the public endpoint to ensure all traffic goes through the private route:
az storage account update \
--name mystorageaccount2026 \
--resource-group myRG \
--default-action Deny \
--bypass None