Why can't I access my VM in a peered vnet over VPN?

Ben McFadden 31 Reputation points
2024-01-17T05:26:15.98+00:00

I have two vnets in Azure: vnet-hub and vnet-spoke.

vnet-hub has a virtual network gateway and a VM: vm-hub.

vnet-spoke has a VM: vm-spoke.

The vnets are peered and configured to allow access to each other and vnet-spoke allows the gateway in vnet-hub to forward traffic to it.

Neither VM has a public IP address. Windows Firewall is turned off on both VMs.

When connected to the VPN I can establish an RDP connection to vm-hub using its private IP address, but not to vm-spoke.

I can also establish an RDP connection from vm-hub to vm-spoke.

Why can't I connect directly to vm-spoke, please?

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,402 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,196 questions
0 comments No comments
{count} votes

Accepted answer
  1. Priya Kumar 1,096 Reputation points Microsoft Employee
    2024-01-17T07:29:03.5733333+00:00

    Hello @Ben McFadden ,

    Thanks for reaching out to Microsoft Q and A platform.

    I understand that you unable to Access the Spoke Vnet from on premise, could you please verify the following steps?

    1. Please check the NSG of the incoming traffic on the Spoke Vnet or the VM. They must allow your on-premise.
    2. Try to enable the Psping from on premise to spoke VM, this error message would give you more about the reachability.
    3. Make sure to Add the Route to the Spoke Vnets on the On-premise side, so that it knows where to forward the traffic when reach the Spoke.
    4. Please do analyze the Effective Routes on the Spoke VM NIC, which would confirm what route it takes for the On-premise Address Range.
    5. If these routes are configured correctly, then your troubleshooting must be with On-premise Firewall and Route.

    Regards, Priya Kumar.


1 additional answer

Sort by: Most helpful
  1. Andreas Baumgarten 98,621 Reputation points MVP
    2024-01-17T06:32:20.9266667+00:00

    Hi @Ben McFadden ,

    do you added a route in your on-premises network pointing to the vnet-spoke?

    If you take a look in the routing table of your on-premises device is there a route to the vnet-spoke?


    Kind regards

    Andreas Baumgarten