Unable to resolve custom DNS name for virtual machines via VPN
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.