Unable to resolve custom DNS name for virtual machines via VPN

Najam ul Saqib 320 Reputation points
2024-11-02T02:16:03.2766667+00:00

Hi,

I am trying to resolve to custom DNS name for virtual machines and SQL on VMs in my tenant; the structure is as follows:

We have 2 subscriptions i.e. sub1 and sub2, the private DNS zone and VPN gateway are in sub1 whereas the VMs are in sub2. The VNet of sub1 is VNet 1 and of sub2 is VNet 2.

The VNet 2 is peered with VNet1 (and some other VNets as well), the VPN gateway is site-to-site connected to AWS VPC as well.

Both VNet1 and VNet2 are added as virtual network links in the private DNS zone.

Now when I connect to the VPN gateway using point-to-site connection, I am able to RDP to the machine using its private IP but when I try using the DNS name (whose A record is configured in the recordsets of private dns zone), it fails.

I have tested from within VM in sub2 and I can perform nslookup on the DNS names and they resolve fine, but it no longer works when I am trying to resolve via VPN.

Can someone explain what's wrong here? I am happy to share more details.

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
690 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,974 questions
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,556 questions
Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
1,020 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,491 questions
0 comments No comments
{count} votes

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.