Search code examples
azureazure-virtual-networkazure-vpn

DNS Fails on VPN into Azure Network with DNS server on Peered network


I have the following setup in Azure:

ResourceGroup 1

  • Virtual Machine which is DNS & DC Server 'My1stVM'
  • Virtual Network 'vNet1'
  • Peering from vNet1 to vNet2

Resource Group 2

  • Virtual Network 'vNet2'
  • Peering from vNet2 to vNet1
  • Virtual Machine 'My2ndVM'
  • Virtual Network Gateway

When I create a VPN connection from my home laptop into the Virtual Network Gateway, I can:

  • Connect to VPN successfully
  • RDP onto My2ndVM by internal ip address only, cannot do it by FQDN or computername
  • Ping My2ndVM by intenral ip address only, cannot do it by FQDN or computername

I don't understand why I cannot ping my computername or FQDN.

If I do NSLookUp I get

C:\Users\MyUser>nslookup
DNS request timed out.
timeout was 2 seconds.
Default Server:  UnKnown
Address:  192.167.64.4

192.167.64.4 is the correct internal IP for the DNS Server

If I try to Ping 192.167.64.4 I get:

C:\Users\MyUser>ping 192.167.64.4

Pinging 192.167.64.4 with 32 bytes of data:
Reply from 193.204.206.100: TTL expired in transit.
Reply from 193.204.206.100: TTL expired in transit.
Reply from 193.204.206.100: TTL expired in transit.
Reply from 193.204.206.100: TTL expired in transit.

Ping statistics for 192.167.64.4:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Is anyone able to help me understand the problem and how to fix it?


Solution

  • According to your description, your home laptop connect to Vnet2 via P2S VPN, you want to use laptop to ping My1stVM, am I correctly?

    You are not able to communicate across the VPN, because there is no derived transitive relationship across VPN.

    You can ping Vnet2 via P2S VPN, and vm2 can ping vm1 via vnet peering, but you can't ping vm1.

    I don't understand why I cannot ping my computername or FQDN.

    Because you can't access to DNS server. DNS does not work for you.