Lesson 6 of 6 Azure Networking Services

Understanding Public and Private Endpoints

This lesson defines public and private endpoints, explains how private endpoints use Azure Private Link, and compares the two.

Learning outcomes

After completing this lesson, you will be able to:

  • Define public and private endpoints.
  • Explain the effect of a private endpoint on network exposure.
  • Identify when to use a private endpoint.

Public endpoints

Many Azure PaaS services, such as Azure Storage, Azure SQL Database and Azure Key Vault, are reached by default through a public endpoint: a public DNS name, such as contoso.blob.core.windows.net, that resolves to a public IP address. Any client with internet access can attempt to connect, and access is then controlled by authentication and by the service's firewall settings, which can limit connections to particular IP address ranges or virtual networks.

Public endpoints are convenient, because clients anywhere can connect without extra network configuration, but the service is exposed to the internet, which some organizations' security policies do not allow for sensitive data.

Private endpoints and Azure Private Link

A private endpoint is a network interface that uses a private IP address from your virtual network and connects privately and securely to a specific instance of a service powered by Azure Private Link, such as one particular storage account. Clients in the virtual network connect to the service through that private IP address, so traffic stays on the Microsoft backbone network.

Private endpoints have several important consequences:

  • The service can be reached from on-premises networks connected by VPN Gateway or ExpressRoute, and from peered virtual networks, using private addresses.
  • Public network access to the service can then be disabled, so the service is not reachable from the internet at all.
  • Because the endpoint maps to one specific resource, it protects against data being copied to a different, unauthorized instance of the same service.
  • DNS is configured, usually with a private DNS zone, so that the service's normal name resolves to the private IP address inside the network.

The following diagram shows a private endpoint replacing a public endpoint.

Public endpoints compared with private endpoints. A service's public endpoint is reachable from the internet. A private endpoint is a network interface with a private IP address in your virtual network, connected through Azure Private Link to one specific resource, such as one storage account. Clients in the network, in peered networks and on-premises over VPN or ExpressRoute use the private address, the service's name resolves to it through private DNS, and public access can then be disabled.
With public access disabled, only private paths reach the service.
Select all that apply

What a private endpoint changes

Exam skills 2.2.6

Identify the consequences of adding a private endpoint.

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

Comparing public and private endpoints

The following comparison summarizes how the two kinds of endpoint differ.

Public endpoint
IP addressPublic IP address
Reachable fromThe internet (subject to firewall rules)
Traffic pathOver the internet to the service
SetupAvailable by default
Choose when Clients anywhere need simple access
Private endpoint
IP addressPrivate IP address from your VNet
Reachable fromThe VNet, peered VNets and connected on-premises networks
Traffic pathOver the Microsoft backbone network
SetupCreated and configured with Private Link and DNS
Choose when The service must not be exposed to the internet
Sort into groups

Public or private endpoint?

Exam skills 2.2.6

Decide which kind of endpoint each statement describes.

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

Removing internet exposure

A company stores confidential documents in an Azure storage account. The security team requires that the storage account is not reachable from the internet and that applications in an Azure virtual network and users in the head office, which is connected by site-to-site VPN, can still access it. What should be configured?

Create a private endpoint for the storage account in the virtual network and disable public network access. Applications in the virtual network reach the account through its private IP address, and head-office users reach the same private IP address over the VPN. Leaving only the public endpoint with firewall rules would still expose the account to the internet, which the requirement forbids.

Check yourself

Which Azure service powers private endpoints?

Show answer

Azure Private Link, which connects a private IP address in your VNet to a specific instance of a service.

Exam Tips

Remember for the exam

  • A public endpoint uses a public IP address reachable from the internet.
  • A private endpoint gives a specific service instance a private IP address in your VNet through Azure Private Link.
  • With a private endpoint, public access can be disabled while on-premises networks still connect over VPN or ExpressRoute.