Windows VPN: How to enforce that the VPN remains always on?

Andrew Fogarty 11 Reputation points Microsoft Employee
2022-03-05T02:49:49.32+00:00

How can I force Windows to keep my VPN connection alive? I am running a virtual machine with Windows 10 that is connected to a VPN through Windows (VPN Settings in Start).

After some time, the VPN connection will disconnect. I do not want it to disconnect because the virtual machine needs to do work while connected to the VPN while I am not around.

Windows for business | Windows Client for IT Pros | Networking | Network connectivity and file sharing
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Devaraj G 2,096 Reputation points Volunteer Moderator
    2022-03-05T05:33:48.44+00:00

    HI Andrew,

    I assume you leveraging Azure VPN gateway for p2s.
    Can you please let us know what is the type of azure gateway SKU and VPN type (like IKev2 ?)
    also the windows 10 build number,

    You can configure the Always On VPN client through PowerShell, Microsoft Endpoint Configuration Manager, or Intune. All three require an XML VPN profile to configure the appropriate VPN settings. But its all inteconnected with the type of VPN solution you currently use.

    https://learn.microsoft.com/en-us/windows-server/remote/remote-access/vpn/always-on-vpn/deploy/vpn-deploy-client-vpn-connections#:~:text=Create%20the%20Always%20On%20VPN%20configuration%20policy&text=Go%20to%20Intune%20%3E%20Device%20Configuration,the%20Profile%20type%20drop%2Ddown.

    Also ensure the VM doesnt go to sleep mode. Because p2s VPNs are known to disconnection.

    0 comments No comments

  2. Andrew Fogarty 11 Reputation points Microsoft Employee
    2022-03-07T03:39:27.883+00:00

    Thanks for the help! I am actually just trying to use the Windows 10 VPN client (control panel version) to connect to corpnet.

    0 comments No comments

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.