Configure access to private endpoints

4.1 Azure Private Link and Private Endpoints

📘Microsoft Azure Networking Solutions (AZ-700)


1. What are Private Endpoints?

A Private Endpoint is a network interface that connects you privately and securely to an Azure service, without exposing the service to the public internet.

Key points:

  • It uses a private IP address from your Virtual Network (VNet).
  • Traffic stays within Azure’s backbone network, not the public internet.
  • It works for services like:
    • Azure Storage (Blob, File)
    • Azure SQL Database
    • Azure Key Vault
    • Custom services hosted in Azure (like App Services)

IT Environment Example:
If your company has an Azure SQL Database storing sensitive financial data, you don’t want it exposed publicly. A private endpoint ensures that only resources in your VNet can connect to it.


2. How Private Endpoints Work

  1. Private Endpoint Creation
    • You select a service (e.g., Storage Account) and a VNet subnet.
    • Azure assigns a private IP in that subnet.
    • The service becomes reachable only through that IP from your VNet.
  2. DNS Integration
    • Private endpoints require DNS resolution to the private IP.
    • You can:
      • Use Azure’s private DNS zones, automatically linking the service FQDN (e.g., mydb.database.windows.net) to the private IP.
      • Or configure your own on-premises DNS to resolve the service privately.
  3. Traffic Flow
    • When a resource in your VNet connects to the service FQDN, traffic flows internally via the private endpoint.
    • Public endpoints are blocked unless explicitly allowed.

3. Configuring Access to Private Endpoints

Configuring access involves three main steps:

Step 1: Create the Private Endpoint

  1. Go to the Azure portal → select the target service.
  2. Choose Private Endpoint → Click Create.
  3. Choose:
    • Resource group
    • VNet and subnet
    • Private DNS integration (optional but recommended)
  4. Confirm and create.

Step 2: Configure Network and Security

  1. Subnet Permissions
    • Ensure the subnet allows network traffic from your VMs or other resources.
    • Apply Network Security Groups (NSGs) carefully:
      • Allow required ports (e.g., TCP 1433 for SQL)
      • Deny unwanted traffic
  2. Firewall Rules
    • Some services, like Azure SQL, require firewall configuration.
    • Add the private endpoint IP to the allowed list if needed.

Step 3: Configure DNS

  • After creation, the service’s FQDN should resolve to the private IP.
  • You can use:
    • Azure Private DNS Zone
      • Example: privatelink.database.windows.net
      • Automatically links to the private endpoint IP.
    • Custom DNS server
      • Map the service domain to the private IP manually.

IT Environment Example:
A VM in your subnet tries to connect to mydb.database.windows.net. DNS resolves it to the private IP of the private endpoint, keeping the connection entirely internal.


4. Optional: Restrict Public Access

  • By default, the service may still allow public connections.
  • To fully secure:
    • Disable public network access.
    • Only allow access via the private endpoint.

5. Benefits of Private Endpoints

  1. Security
    • No exposure to the public internet.
  2. Compliance
    • Useful for GDPR, HIPAA, or other data protection requirements.
  3. Simplified Access
    • VNets, on-prem networks, and peered VNets can securely connect.
  4. Seamless DNS
    • Applications can connect using standard service FQDN.

6. Quick Exam Tips

  • Know the difference between Private Link vs. Service Endpoint
    • Private Link → Uses private IP, secure, can restrict public access.
    • Service Endpoint → Still uses public IP, adds VNet access restrictions.
  • Remember DNS mapping is key for access.
  • Firewall and NSG rules must allow traffic from the private IP.
  • Private Endpoint can be cross-region using global VNet peering.

Summary Table for Easy Recall

FeaturePrivate EndpointService Endpoint
IP UsedPrivate IP in VNetPublic IP of service
TrafficInternal (Azure backbone)Public network
SecurityCan block public accessCannot fully block public access
DNS RequiredYes (Private DNS)Optional
Example ServicesSQL, Storage, Key VaultStorage, SQL
Buy Me a Coffee