🎉 75% of content is free forever — Unlock Premium from $10/mo →
CW
NEWSLIVESearch All Content
đŸ’ŧ Servicesâ„šī¸ Aboutâœ‰ī¸ ContactView Pricing Plansfrom $10

Azure VNet, Private Endpoints & Networking

Azure Data EngineeringAzure Networking⭐ Premium

Prerequisites

  • !CIDR notation and the difference between a subnet and a network
  • !What DNS resolution does and why a name maps to an address
  • !Basic awareness of Azure resource types

What You'll Learn

  • 1Lay out hub and spoke VNets with non-overlapping address space and justify every subnet
  • 2Explain what a private endpoint changes at the IP, DNS and NSG layer
  • 3Write NSG rules that allow only the paths a data service actually needs
  • 4Decide between a self-hosted integration runtime and a managed private endpoint
  • 5Spot the private-link failure that only shows up as a DNS problem

Why data platforms break the default network

Out of the box, Azure PaaS services accept traffic from the public internet. That is convenient for a tutorial and unacceptable for a lake holding customer records. The moment a security review happens, three questions arrive: can the storage account be reached from the internet, who can reach it, and can you prove neither changed last week.

A virtual network is a private address space you define, divided into subnets. Subnets are the unit of policy, because network security groups and route tables attach to subnets rather than to individual NICs. A data platform typically needs at least three: a gateway subnet for the hub, a compute subnet for Databricks or Synapse workers, and a data subnet reserved for private endpoints. Keeping endpoints in their own subnet makes it obvious which traffic is east-west platform traffic and which is management traffic.

The address plan is decided once and rarely changed. Overlap is the trap: if the VNet you later peer with already uses 10.1.0.0/16, peering fails permanently and the fix is a re-address. Plan the whole estate on a single wide range such as 10.0.0.0/8 carved into regional /16 blocks, and record the allocation somewhere versioned.

Hub, spokes and where traffic is inspected

The hub-spoke pattern puts shared services in one VNet: firewall or Azure Firewall, VPN or ExpressRoute gateway, Bastion, and often the private DNS zones. Application workloads live in spokes that peer to the hub. Peering is non-transitive, so a spoke cannot reach another spoke through the hub unless you enable virtual network gateway transit or place a firewall in the path and add routes.

For data engineering the traffic pattern matters more than the topology diagram. Ingestion pulls from a source into ADLS. Compute reads ADLS and writes back. A warehouse reads curated tables. None of that traffic needs to leave the VNet, which is exactly what private endpoints give you: a network interface with a private IP inside your subnet, bound to the Azure service.

MechanismAddress seen by the serviceTravels overNSG applies toTypical use
Service endpointPublic Azure service addressMicrosoft backboneNo, on the service pathSimple storage firewalls, no extra cost
Private endpointPrivate IP from your subnetPrivate LinkYes, on the NICADLS, Synapse, Cosmos DB, Key Vault
Public endpoint with IP rulesPublic addressInternet plus backboneNot meaningfullyDevelopment only, never production
VNet integrationYour subnet addressesVNetYesApp service outbound, not storage inbound

What a private endpoint actually changes

Three things change when you create a private endpoint, and candidates who name only the first one usually miss the follow-up question.

First, the service receives a private IP from your subnet, so traffic stays on the Microsoft backbone between your VNet and the service. Second, and this is the part that surprises people, the public endpoint of the storage account still exists. You must separately set defaultAction to Deny on the storage firewall, otherwise the public path remains usable by anyone with a key. Third, name resolution changes: the fully qualified name of the storage account must resolve to the private IP, which requires a private DNS zone linked to the VNet.

For ADLS Gen2 the zone is privatelink.dfs.core.windows.net, because the data lake endpoint uses the dfs subdomain. For blob-only access it is privatelink.blob.core.windows.net. Creating the endpoint without the matching zone produces the classic symptom: the endpoint exists, the firewall allows it, and every client fails to resolve the name.

resource privateDnsZone 'Microsoft.Network/privateDnsZones@2024-01-01' = {
  name: 'privatelink.dfs.core.windows.net'
  location: 'global'
}

resource vnetLink 'Microsoft.Network/privateDnsZones/virtualNetworkLinks@2024-01-01' = {
  name: 'link-spoke-data'
  parent: privateDnsZone
  location: 'global'
  properties: {
    virtualNetwork: { id: spokeVnet.id }
    registrationEnabled: false
  }
}

resource privateEndpoint 'Microsoft.Network/privateEndpoints@2024-01-01' = {
  name: 'pe-adls-gen2'
  location: location
  properties: {
    subnet: { id: spokeVnet.properties.subnets[2].id }
    privateLinkServiceConnections: [
      {
        name: 'adls-connection'
        properties: {
          privateLinkServiceId: storageAccount.id
          groupIds: ['dfs']
        }
      }
    ]
  }
}

Note the groupIds value. A storage account exposes several subresources, blob and dfs among them. Asking for the wrong one creates a working endpoint that still cannot serve the API you are calling.

NSG rules for data services

A network security group evaluates rules by priority, lowest number first, and stops at the first match. Deny rules below the allow list are a safety net, not a substitute for a tight allow list. Data services need a surprisingly small set of inbound ports, and most of them are service-tagged rather than IP-based.

{
  "securityRules": [
    {
      "name": "AllowDatabricksDriverInbound",
      "properties": {
        "priority": 100,
        "direction": "Inbound",
        "access": "Allow",
        "protocol": "Tcp",
        "sourcePortRange": "*",
        "destinationPortRange": "443",
        "sourceAddressPrefix": "AzureDatabricks",
        "destinationAddressPrefix": "*"
      }
    },
    {
      "name": "AllowSynapseStudio",
      "properties": {
        "priority": 200,
        "direction": "Inbound",
        "access": "Allow",
        "protocol": "Tcp",
        "sourcePortRange": "*",
        "destinationPortRanges": ["1433", "1443"],
        "sourceAddressPrefix": "SqlManagement",
        "destinationAddressPrefix": "*"
      }
    },
    {
      "name": "DenyAllElse",
      "properties": {
        "priority": 4096,
        "direction": "Inbound",
        "access": "Deny",
        "protocol": "*",
        "sourcePortRange": "*",
        "destinationPortRange": "*",
        "sourceAddressPrefix": "*",
        "destinationAddressPrefix": "*"
      }
    }
  ]
}

Service tags are the important idea here. AzureDatabricks is a set of addresses that Azure maintains for you, so the rule stays correct when the platform expands. Hard-coded source ranges are the single most common cause of a pipeline that worked in testing and stopped working the following month.

Self-hosted runtime or managed private endpoint

Azure Data Factory needs some way to reach both on-premises sources and cloud PaaS services. Two mechanisms exist and they solve different problems.

A self-hosted integration runtime runs on machines you control, either in your VNet or on-premises. Choose it when the source is behind your own firewall, when you need a fixed outbound IP that a partner allow-lists, or when data must never traverse the public internet. You own patching, scaling and availability, which means it becomes a production system you operate.

A managed virtual network with managed private endpoints is the cloud-native path. ADF itself places the flow inside a managed VNet and creates private endpoints on your behalf. Choose it when every source is already in Azure, because it removes the VM fleet entirely. The trade-off is less control over routing and a harder time explaining to a network team exactly where packets go.

{
  "name": "ir-selfhosted-prod",
  "type": "Microsoft.DataFactory/factories/integrationRuntimes",
  "apiVersion": "2018-06-01",
  "properties": {
    "type": "SelfHosted",
    "typeProperties": {
      "linkedInfo": {
        "type": "LinkedIntegrationRuntimeKey",
        "key": "your-encrypted-registration-key"
      }
    },
    "hostCaching": "Enabled"
  }
}

In an interview, the strongest answer names both options and states the deciding factor: where the source lives and who is willing to operate the runtime.

Debugging the private link path

When a private endpoint deployment "succeeds" but clients cannot connect, walk the path in order. Start with the network interface: does the private IP exist in the expected subnet. Then check the DNS zone link, because an unlinked zone silently returns the public address. Then confirm the storage firewall actually denies public access, and finally check any on-premises DNS forwarding, which will not know about the private zone unless you forward privatelink.* queries to Azure DNS.

The quickest verification is a two-command check from a VM inside the spoke: resolve the account name and compare the returned address with the private endpoint IP.

# From a VM in the data subnet
nslookup mystorageaccount.dfs.core.windows.net
# Expect the 10.x address of the private endpoint, not a public address

az network private-endpoint show \
  --name pe-adls-gen2 \
  --resource-group rg-network-prod \
  --query "customDnsConfigs" -o table

If the name still resolves publicly, the zone link is missing or the VM is using a custom DNS server that does not forward to 168.63.129.16, the Azure platform DNS resolver.

Common Mistakes

Creating a private endpoint and assuming the public endpoint is now unreachable

Fix: Set the storage account network rule default action to Deny, and confirm with an anonymous request from outside the VNet

Using overlapping address space, then discovering peering cannot be established

Fix: Allocate address space centrally before any VNet is created, and treat changes as a design review item

Writing NSG rules with hard-coded source IP ranges

Fix: Prefer service tags such as AzureDatabricks, SqlManagement and Storage, and audit the rules on a schedule

Assuming spokes can talk to each other through the hub

Fix: Peering is not transitive; enable gateway transit, add a firewall path, or peer the spokes directly

Interview Questions

Q1: Explain the hub-spoke topology for a data platform.

The hub holds shared services such as firewall, VPN gateway, Bastion and private DNS zones. Spokes hold workloads such as Databricks, Synapse and ADF, each peered to the hub. It centralises governance and egress while keeping workload address space isolated.

Q2: Private endpoint or service endpoint for ADLS Gen2 in production?

Private endpoint, because it gives a private IP inside your VNet so NSGs and route tables apply to the NIC. Service endpoints keep the public address of the service and cannot be filtered at the network layer.

Q3: Which DNS zone does an ADLS Gen2 private endpoint need?

privatelink.dfs.core.windows.net, because Gen2 is served by the dfs endpoint. Creating the blob zone instead produces a resolvable-looking but broken configuration.

Q4: When would you choose a self-hosted integration runtime over a managed VNet?

When the source is on-premises, when a partner requires a fixed outbound IP, or when policy forbids data crossing the public internet. For cloud-only sources the managed VNet removes the infrastructure you would otherwise have to operate.

Q5: How does private link affect data transfer cost?

Traffic between your VNet and the service stays on the Microsoft backbone rather than the public internet, so you avoid internet egress but still pay standard regional data transfer charges where they apply.

Key Takeaways

  • Subnets are the unit of policy; plan address space before the first VNet is created
  • A private endpoint changes the IP and DNS path, not the storage firewall, so both must be configured
  • Service tags keep NSG rules correct as Azure infrastructure changes
  • Peering is not transitive, and hub transit is a deliberate configuration
  • Most private-link outages are DNS problems, so verify resolution before suspecting the network
🔒

Premium Content

Azure VNet, Private Endpoints & Networking

You've previewed the first section. Unlock this full lesson and 900+ advanced tutorials with a Premium plan.

đŸŽ¯End-to-end Projects
đŸ’ŧInterview Prep
📜Certificates
🤝Community Access

Already a member? Log in

CW

ChatWhole Learn Editorial Team

Written by experienced data scientists, software engineers, and educators. All content is reviewed by industry professionals to ensure accuracy and relevance.

Last reviewed: 2026-10-12

—
☆☆☆☆☆
0 ratings

Rate & Feedback

Advertisement