azurevirtual-machinevpnwindows-server-2012azure-vpn

Connect from Azure Windows VM (Windows Server 2012) to VPN using built-in VPN client


I am trying to connect to a VPN from a Windows VM on Azure and cannot do so. I am using the built-in Windows VPN Client.

I am connecting to this VPN in order to be able to access a server within that VPN and send and receive HTTP Requests.

I have been able to connect to this VPN normally on other devices using the built-in Windows VPN Client. I followed the exact same steps for the VM but receive the following error when trying to connect:

Error 800:The remote connection was not made because the attempted VPN tunnels failed. The VPN server might be unreachable. If this connection is attempting to use an L2TP/IPsec tunnel, the security parameters required for IPsec negotiation might not be configured properly

Error

I have also opened ports 1723,1701,500,47,4500 in Azure portal for both inbound and outbound on the Azure Portal (screenshot here)

I have also tried the steps described in this post:

Make a VPN Connection from Azure VM

But does not do what I want. I have the VPN's public IP and username/password, and nowhere does the above mention how to set this up.

Do I need any additional settings or open any other ports in order for this to work?


Solution

  • From your comment, it seems that you want to connect Azure VM to a server on your on-premise network with your local VPN device.

    In this case, you could set up a site-to-site VPN connection to connect the Azure VNet and on-premise network following this tutorial: https://learn.microsoft.com/en-us/azure/vpn-gateway/tutorial-site-to-site-portal

    After that, you can directly connect to your Azure VM with its private IP address from your on-premise server. In fact, you don't need to connect from Azure Windows VM (Windows Server 2012) to VPN using a built-in VPN client because once the VPN is connected, the traffic from the on-premise network to the Azure network goes through the VPN tunnel and vice versa. We don't need to connect from Azure VM just from on-premise resources.