Cannot connect to the Private Endpoint of an Azure Storage Account from AWS

Alex Sanchez 20 Reputation points
2025-04-09T14:00:24.99+00:00

I am using a Site to Site VPN between AWS and Azure, so all the traffic is private between them. The connection is successful and is showing UP in the AWS side and Connected on the Azure side. I also tested the connection between an EC2 instance and a VM using ping, telnet, and tcpping command by pointing to the private IP of each machine, and all of them are successful and show connection between them also through these ports. Also, I ensured that the traffic by these protocols is enabled using the security groups.

The problem starts when try to test the connection to an Azure Storage Account using a Private Endpoint. The service is not resolving the private endpoint when using the hostname instead of the private IP. I tested with curl -v and telnet command to the private IP of the storage account and shows connection. But if I try using the hostname in it does not work for resolving the private ip, for example, when using nslookup command with the hostname it shows the following:

Server:         192.168.0.2
Address:        192.168.0.2#53
Non-authoritative answer:
rclonedevsa.blob.core.windows.net       canonical name = rclonedevsa.privatelink.blob.core.windows.net.
rclonedevsa.privatelink.blob.core.windows.net   canonical name = blob.blz22prdstr07a.store.core.windows.net.
Name:   blob.blz22prdstr07a.store.core.windows.net
Address: 52.239.169.228

So, it's not resolving a private IP, instead is showing the public one, even when the host file is modified (for testing purposes):

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 
::1 localhost6 localhost6.localdomain6 
10.1.2.4 rclonedevsa.blob.core.windows.net

In the end, if I try to use a service which depends on this hostname, it will fail because of this like, for example, using Rclone.

Any guidance on this would be really helpful, thanks.

Azure VPN Gateway
Azure VPN Gateway
An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.
1,712 questions
0 comments No comments
{count} votes

Accepted answer
  1. TP 116.3K Reputation points
    2025-04-09T14:23:02.55+00:00

    Hi Alex,

    Are you using conditional forwarding on AWS side to send DNS requests over to Azure DNS Private Resolver on Azure side, or your own DNS server VM in VNet on Azure side?

    The idea is, when the DNS lookup occurs from AWS side, the request is sent over to DNS server (or Azure DNS private resolver) in VNet in Azure, and this DNS server sends request to 168.63.129.16 which returns correct private IP for the private endpoint.

    Please see article below (scroll a bit and click on diagram), and add a comment below if you have questions. If you think I'm understanding your configuration/needs incorrectly, please feel free to let me know in a comment and clarify.

    What is Azure DNS Private Resolver?

    https://learn.microsoft.com/en-us/azure/dns/dns-private-resolver-overview

    Please click Accept Answer and upvote if the above was helpful.

    Thanks.

    -TP

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Praveen Bandaru 2,415 Reputation points Microsoft External Staff
    2025-04-09T18:56:41+00:00

    Hello Alex Sanchez

    I understand that you are facing a resolution issue when you are trying to connect AWS to azure storage account:

    For further investigation, please provide the following information:

    Also, let me know which DNS you are using in the private endpoint VNET - Azure provided or custom DNS.

    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 (AWS), you need to configure a conditional forwarder in the on-prem DNS server machine to point to the private DNS resolver inbound IP. Additionally, you need to configure the private DNS resolver inside Azure.

    you are not ready to use a private DNS resolver, you need to configure a VM as a DNS server instead. Then, set up a conditional forwarder in the on-prem (AWS) DNS server machine to point to the VM's private IP.

    Check the below public 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 "Accept Answer " and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


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.