Unable to resolve Azure private endpoint to private IP over Azure VPN

Jeff Morris 25 Reputation points
2025-03-27T21:05:29.75+00:00

TL;DR: Azure VPN clients working from home still resolve Azure File Storage Private Endpoint to the public IP instead of private.

All users including technical staff work from home using their work computers and home ISP.

Azure VPN is utilized to grant access to Azure resources.

We have configured an Azure File Storage account with file shares to server as network folder shares for the company. The file share has public network access disabled. A private endpoint has been created attached to the general servers VNET with a private IP in that subnet range to allow access to the file shares from the Azure network.

We do have a Private DNS zone automatically created with the private endpoint, and we added the A record to it for the storage account there as it only made an SOA record automatically and no other records were generated at the time of creation.

We added a forward lookup zone for "privatelink.file.core.windows.net" to our DNS servers (running as VMs inside of Azure) with an A record to the file storage account.

We are using ADDS/RBAC roles to allow resource access, not the storage keys and that portion seems to be functioning as desired to limit access to resources as intended.

Servers are resolving the

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
752 questions
{count} votes

Accepted answer
  1. chrischin 915 Reputation points Microsoft Employee
    2025-03-28T16:29:29.0666667+00:00

    Hi Jeff,

    Your CONFIG1 has some drawbacks, and I am confident we can get something similar to CONFIG2 to work.

    I see you are using the DNS role on Windows Server. Instead of doing it the way you have in the screen shot above (CONFIG1), do it this way instead:

    1. Go to DNS Manager
      1. User's image
    2. Right-click on your server name and go to Properties
      1. User's image
    3. Go to the Forwarders tab
    4. Click Edit and add Azure's DNS to it: 168.63.129.16
      1. User's image

    Finally, remove the Azure Files domain from your Forward Lookup Zone.

    What this is doing is telling your DNS that anytime it receives a DNS query that it doesn't know how to resolve (not in any of your Foward Lookup Zone), send it off to Azure DNS to figure it out.

    This way, you are not having your DNS server resolving Azure FQDNs which is hard to manage and may not be the behavior you want as you continue to add more resources to your environment. With CONFIG1, what would happen if you added a second Azure File share with its own private endpoint that has a different private IP than this one?

    This will also cover you for future private endpoints on other Azure services.

    Which VNET in your screenshot is the pair of DNS Servers residing in?

    Do you have both of their IP address set in each of the VNET's?

    Like this for me but use your own DNS Server IP addresses:

    User's image

    As for your P2S VPN clients, you will need to push a modified azurevpnconfig_xxx.xml file with this content:

    User's image

    Where x.x.x.x, and y.y.y.y would be your pair of DNS servers (https://learn.microsoft.com/en-us/azure/vpn-gateway/azure-vpn-client-optional-configurations).

    To recap, after making these modifications, whenever a server or P2S VPN client needs to resolve your Azure File share FQDN (xyz.file.core.windows.net), the behavior will be consistent and be handled by your pair of DNS servers. Your DNS servers (once you remove the forward lookup zones from CONFIG1), will realize it doesn't know the answer for file.core.windows.net (nor should it), and forward to 168.63.129.16. If the VNET that your pair of DNS Servers are sitting in (shd-adds-westus3-vnet?), has a vnet link to the Private DNS Zone for your private endpoint, it will return the private endpoint IP.


1 additional answer

Sort by: Most helpful
  1. Praveen Bandaru 2,415 Reputation points Microsoft External Staff
    2025-03-28T14:56:10.95+00:00

    Hello Jeff Morris

    Thank you for your response.

    • If you are using custom DNS, you need to set a forwarder in the custom DNS server machine point to azure DNS IP (168.63.129.16.). And also, please confirm whether the custom DNS and private endpoint are in the same VNET or different VNETs, and check in the private DNS zone VNET's are linked properly.
    • If you are connecting from on-premises, you need to configure a conditional forwarder in the on-prem DNS server machine to point to the private DNS resolver. Additionally, you need to configure the private DNS resolver inside Azure.

    kindly check the below document for more understanding:

    https://github.com/msrini-MSFT/Troubleshooting-Private-Link-DNS-Scenarios?tab=readme-ov-file#scenario-2---if-your-source-machine-is-deployed-on-premises-other-cloud


    Hope the above answer helps! Please let us know do you have any further queries.

    Please do consider to “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.