Private Link vs. Azure Firewall DNAT


Utilizing Azure Private Link and Azure Firewall with DNAT presents distinct approaches to accessing web apps, balancing between security and exposure. Private Link emphasizes utmost security and simplicity, ensuring no direct exposure to the public internet, offering private connectivity within Azure’s network, and thereby might be favourable for compliance with stringent data protection regulations. Conversely, utilizing Azure Firewall with DNAT, while still secure, necessitates more intricate management due to the maintenance of firewall rules and allows partial exposure to the internet, making it apt for applications that mandate external accessibility.

Deciding between these technologies entails evaluating specific organizational, regulatory, and application needs, underlining a choice between a more internally focused, simple network topology versus a solution that offers controlled public accessibility with an added management overhead.

Azure Private Link is a service in Microsoft Azure that enables you to access Azure services (like Azure Storage, Azure Cosmos DB, and SQL Database) securely over a private IP address in your Virtual Network (VNet). It provides private connectivity from a VNet to Azure platform as a service (PaaS), customer-owned, or Microsoft partner services. It simplifies the network architecture and secures the connection between endpoints in Azure by eliminating data exposure to the public internet.

Key Features and Concepts:

  1. Private Endpoint:
    • A private endpoint is a network interface in your VNet that connects you privately and securely to a service powered by Azure Private Link.
    • The private endpoint uses an IP address from the VNet address space for your VNet service of choice.
  2. Private Link Service:
    • Azure services can be accessed via Private Link, providing a private IP for the service which lives in your VNet.
    • Similarly, you can create your own “Private Link Service” in your VNet and deliver it to your customers.
  3. Private Link Resource:
    • A resource that is enabled for Private Link is known as a Private Link Resource (such as Azure Database for MySQL).
  4. Private DNS Zone:
    • A Private Link sets up a private DNS zone which maps the private endpoint to a readable DNS name.
    • For example, might resolve to a private IP address like

Sequence of Communication during the setup

  • Service Provisioning: When a user wants to expose a service privately in Azure, they configure Azure Private Link for the specific service instance (like Azure SQL Database, Blob Storage, etc.).
  • Private Link Configuration: The Private Link gets associated with a specific subnet in a Virtual Network (VNet).

2. Private Endpoint Creation

  • Endpoint Creation: A user creates a Private Endpoint within their VNet. This involves choosing the service they want to connect to, which is enabled with a Private Link.
  • Request to Service: The request to create a Private Endpoint is sent to the Azure service that’s exposed via Private Link.

3. Service Connection Approval

  • Approval of Connection: The service, upon receiving the connection request from the Private Endpoint, either auto-approves it or requires manual approval, depending on the configuration.
  • Connection Established: Once approved, the Private Endpoint is connected to the service via the Private Link.

4. DNS Configuration

  • Private DNS Integration: Typically, the Azure Private DNS Zone is linked to the VNet to resolve the private endpoint’s DNS name to its private IP address.
  • DNS Mapping: A DNS mapping is added which maps the Azure service URL to the private IP address of the Private Endpoint.

5. Communication Flow

  • Client Request: When a client within the same VNet wants to communicate with the service, it makes a DNS request.
  • DNS Resolution: The private DNS zone resolves the service’s URL to the private IP of the Private Endpoint.
  • Secure Traffic Flow: The traffic flows securely over the Azure network from the client to the service through the Private Endpoint and Private Link, ensuring no exposure to the public internet.

6. Data Operation

  • Data Transfer: The data moves through the Azure backbone network, entirely isolated from the external world, between the client and the service.
  • Service Response: The Azure service processes the data/action and sends back the response to the client via the same private pathway.

7. Continuous Operation

  • Ongoing Communication: The client and the Azure service continue to communicate over the private IP securely and seamlessly as if they were part of the same network.
  • Monitoring & Management: Optional, but crucial for maintaining the health and performance of the service and connection, involving logging, auditing, and ensuring security compliance.


  • Security & Compliance: This setup ensures that data is transferred securely over the Azure network, aiding in compliance with data protection regulations.
  • Global Reach: Private Link facilitates communication across Azure regions, providing a secure path for data to traverse globally within the Azure network.

1. Hub-and-Spoke Topology:

  • Hub: Centralized location that manages shared resources, security, and connectivity.
  • Spoke: Separate workloads that connect to the hub for shared resources.
  • Privacy and Security: The web app in the spoke is accessed over a private IP within the VNet, securing the traffic within the Azure network, and avoiding exposure to the public internet.
  • Connectivity: The Private Link allows for connecting to the web app using a private IP address from the VNet, thus maintaining a clear network perimeter.
  • DNS Resolution: Private Link also helps to map a private IP to a private DNS zone, making the web app accessible via a user-friendly DNS name.
  • Data Exfiltration Protection: As the connectivity is private, it significantly reduces the risk of data exfiltration.

Accessing Web App via Azure Firewall Using DNAT Rule

1. Azure Firewall:

  • Fully Stateful: Azure Firewall is a managed, cloud-based network security service that protects your Azure Virtual Network resources.
  • DNAT (Destination Network Address Translation): DNAT is used to route traffic through the firewall to a specific internal destination (like a web app).

2. Use of DNAT:

  • Public Accessibility: With DNAT, the web app can be accessed from the public internet by translating public IP address requests to the private IP of the web app.
  • Routing Through Firewall: All the inbound traffic is processed by the Azure Firewall, where rules and policies (like threat intelligence filtering) are applied before forwarding it to the internal resource.
  • Additional Management: Firewall rules, logging, and management are vital and need to be continually optimized and monitored.

Key Differences:

  1. Network Exposure:
    • Private Link: Keeps traffic on the Azure backbone network and does not expose the app to the public internet.
    • Azure Firewall with DNAT: Exposes the app, albeit securely, to public internet access through specified ports.
  2. Security and Compliance:
    • Private Link: Often preferred for higher-security scenarios where absolutely no internet exposure is permissible.
    • Azure Firewall with DNAT: Still secure but provides a pathway from the internet to the internal resource, which might be scrutinized depending on compliance requirements.
  3. Complexity and Management:
    • Private Link: Relatively simple to set up and manage.
    • Azure Firewall with DNAT: Requires ongoing management of firewall rules, policies, and logs.
  4. Use Cases:
    • Private Link: Ideal when you want completely private connectivity to your web app from your VNets or on-premises.
    • Azure Firewall with DNAT: Useful when you want to securely expose the web app to the internet, allowing access from external clients while maintaining control and visibility.

Table of Differences

AspectPrivate LinkAzure Firewall with DNAT
Network ExposureNo direct exposure to the public internetPartial exposure via public IP with DNAT rules
SecurityHigh, due to lack of internet exposureSecure, but involves internet-facing elements
ComplexityRelatively low and straightforwardHigher due to firewall rule management
ManagementSimplified, with minimal active managementRequires ongoing management of firewall and rules
Connection TypePrivate connectivity within AzureInternet-based connectivity (controlled)
DNS ResolutionPrivate DNS ZonePublic DNS (with DNAT translations)
Use CasesIdeal for strictly internal communication and accessSuitable for applications that require external access
ScalabilityEasily scalable within AzureScalability might require adjustment of firewall rules
ComplianceMight be preferable for stricter data protection regulationsCompliance may vary based on data exposure and use case
CostCosts associated with the Private Link serviceCosts associated with firewall usage, rules, and managed services
Global ReachAccessible across regions via Azure’s internal networkAccessible from the internet, providing global reach with possible latencies

In conclusion, the choice between using Private Link in a hub-and-spoke model and using Azure Firewall with DNAT largely depends on your specific use case, compliance requirements, and management capacity. Both have their own use cases and might be suitable in different scenarios.

Leave a comment