Private Link with Standard Load Balancer

This document outlines how to leverage Azure Private Link in conjunction with a Standard Load Balancer to securely access Azure PaaS services from your virtual networks without exposing them to the public internet.

Note: This configuration is crucial for enhancing security and compliance by minimizing network exposure.

Key Concepts

Understanding the following concepts is essential:

Scenario: Private Link Service with Standard Load Balancer

A common scenario involves exposing a custom application hosted in Azure, behind a Standard Load Balancer, to consumers in other virtual networks. Consumers can access this application via a Private Endpoint.

Azure Private Link with Standard Load Balancer Architecture
Conceptual diagram of Private Link with Standard Load Balancer.

Steps to Implement

The implementation typically involves these high-level steps:

  1. Deploy your application: Host your application in Azure, ensuring it's accessible behind a Standard Load Balancer. This load balancer can be either internal or public, depending on your requirements.
  2. Create a Private Link Service: Configure a Private Link Service associated with the frontend IP configuration of your Standard Load Balancer. This service acts as the entry point for consumers.
  3. Consumer deploys a Private Endpoint: In the consumer's virtual network, create a Private Endpoint. When creating the Private Endpoint, the consumer will select your Private Link Service. This assigns a private IP address from the consumer's VNet to the Private Endpoint.
  4. Configure DNS: Ensure correct DNS resolution so that the application's FQDN resolves to the private IP address of the Private Endpoint. Azure Private DNS zones are highly recommended for this.

Configuration Details

Configuring the Private Link Service

When creating a Private Link Service, you'll need to specify:

Consider the following example using Azure CLI:


az network private-link-service create \
  --name myPrivateLinkService \
  --resource-group myResourceGroup \
  --location eastus \
  --lb-frontend-ip-configurations /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIP \
  --auto-approval-user-ids <consumer-subscription-id>
            

Configuring the Private Endpoint

For the consumer, creating a Private Endpoint involves:

Example using Azure PowerShell:


$privateEndpoint = New-AzPrivateEndpoint -Name "myPrivateEndpoint" `
    -ResourceGroupName "myResourceGroup" `
    -Location "eastus" `
    -Subnet $subnet `
    -PrivateLinkServiceId $privateLinkService.Id `
    -ConnectionName "myConnection"

Set-AzPrivateEndpoint -PrivateEndpoint $privateEndpoint
            
Tip: Utilize Azure Private DNS zones to automatically manage DNS records for your Private Endpoints, simplifying name resolution and ensuring seamless connectivity.

Considerations