Lesson 6 of 6 Securing Azure Virtual Networks

Reaching PaaS Resources Privately with Private Endpoints

This lesson explains private endpoints, their DNS requirements and how they compare with service endpoints.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe how private endpoints connect to a specific resource.
  • Explain the DNS configuration that private endpoints need.
  • Distinguish between service endpoints and private endpoints.

How private endpoints work

A private endpoint is a network interface created in a subnet with a private IP address, connected through Azure Private Link to one specific resource and one target sub-resource: for example the blob, file or dfs endpoint of a storage account (each needs its own private endpoint), sqlServer for Azure SQL, vault for Key Vault, sites for App Service or registry for Container Registry. Clients in the VNet, in peered VNets and in on-premises networks connected by VPN or ExpressRoute reach the resource on that private IP.

Because only that resource is mapped, a compromised VM cannot use the private endpoint to copy data to a different storage account, which reduces data exfiltration risk. The resource's public network access can then be disabled. Private endpoints are billed per hour and per gigabyte processed. A connection to a resource in another tenant, or created without permission on the resource, waits for the resource owner to approve it.

Match the pairs

Target sub-resources

Exam skills 4.2.5

Match each private endpoint with the target sub-resource it uses.

Log in to try this activity Interactive activities are free with an account.

DNS for private endpoints

Clients keep using the resource's normal name, such as stcontoso.blob.core.windows.net. When a private endpoint exists, the public DNS returns a CNAME to stcontoso.privatelink.blob.core.windows.net, and that name must resolve to the private IP inside the network. The usual configuration is a private DNS zone named privatelink.blob.core.windows.net with an A record for the endpoint, created by the portal's Integrate with private DNS zone option and linked to the VNets that need resolution. On-premises clients need their DNS servers to forward the zone to Azure, for example to an Azure DNS Private Resolver inbound endpoint.

Service endpoint
Resource reached atPublic IP of the service
ScopeWhole service type (all storage accounts)
On-premises and peered accessNo
DNS changesNone
CostFree
Choose when Simple, free subnet lock-down
Private endpoint
Resource reached atPrivate IP in your subnet
ScopeOne resource and sub-resource
On-premises and peered accessYes
DNS changesPrivate DNS zone (privatelink)
CostHourly plus data processed
Choose when Private access from anywhere in the network, exfiltration protection

The following diagram shows a private endpoint for a storage account and the DNS path from an on-premises network connected by ExpressRoute.

Making stdata's blob service reachable privately from on-premises over ExpressRoute. A private endpoint for the blob sub-resource in a VNet connected to the ExpressRoute gateway, integrated with the privatelink.blob private DNS zone, replaces public access. A conditional forwarder on the on-premises Windows DNS servers sends the name to a resolver in Azure, so it resolves to the private IP.
The resolver in Azure is shown in outline.
Sort into groups

Service endpoint or private endpoint?

Exam skills 4.2.4 · 4.2.5

Choose the feature that meets each requirement.

Log in to try this activity Interactive activities are free with an account.
Worked example

Private storage for on-premises clients

On-premises applications connected through ExpressRoute must upload files to the blob service of storage account stdata, which must not be reachable from the internet. On-premises DNS uses Windows DNS servers. What should you configure?

Create a private endpoint for stdata with target sub-resource blob in a VNet connected to the ExpressRoute gateway, integrate it with the privatelink.blob.core.windows.net private DNS zone linked to that VNet, and set public network access to Disabled. Configure a conditional forwarder on the on-premises DNS servers for blob.core.windows.net (or the privatelink zone) to an Azure DNS Private Resolver inbound endpoint. A service endpoint cannot serve on-premises clients.

Check yourself

A storage account needs private access to both blobs and files. How many private endpoints are required?

Show answer

Two: one for the blob sub-resource and one for the file sub-resource.

Exam Tips

Remember for the exam

  • A private endpoint maps one resource and sub-resource to a private IP in your subnet.
  • Each storage service (blob, file, dfs) needs its own private endpoint.
  • DNS must resolve the privatelink name to the private IP; link the zone to the VNets.
  • Private endpoints serve peered and on-premises clients; service endpoints do not.