How to Fix Automatic VPN Disconnection: Causes and Practical Solutions

A VPN tunnel that drops for no apparent reason interrupts traffic encryption and exposes data in transit. Automatic VPN disconnection refers to any interruption not initiated by the user, whether it occurs after sleep, a network change, or an operating system intervention. Identifying the exact mechanism allows for fixing the problem at the source rather than manually restarting the connection.

Modern Standby on Windows: the invisible VPN disconnection after sleep

Recent PCs running Windows 10 and 11 use a sleep mode called Modern Standby (S0 Low Power Idle). This mode significantly reduces network activity during sleep, even when the Wi-Fi icon remains displayed. The VPN client then loses its connection to the server without any alert appearing upon waking the machine.

The issue stems from a specific variant: the Standby S0 Network Disconnected mode cuts off any persistent network connection during sleep. As a result, the VPN cannot maintain its tunnel.

There are two technical fixes. The first is to enable the group policy “Allow network connectivity during connected-standby,” which allows for maintaining network connectivity.

The second, more radical, forces a return to traditional S3 sleep mode via the PlatformAoAcOverride registry key, sometimes coupled with a setting in the BIOS. This option disables Modern Standby, slightly increasing the PC’s wake-up time but ensuring that the VPN will no longer be interrupted by sleep.

For users looking to resolve the automatic disconnection of a VPN on a Windows laptop, checking the active sleep mode is the first concrete step before any other manipulation.

Woman in a coworking space configuring her VPN settings on a dual-screen desktop

Android battery optimization: the VPN cut off by the system

On Android (from version 13), power-saving features can pause or completely close the VPN application in the background. The system considers the VPN client as a resource-consuming process and treats it like any other application.

This behavior is reinforced by manufacturer overlays. Samsung, Xiaomi, and other manufacturers add their own battery managers, which impose additional restrictions. The VPN application can be killed even if it displays a persistent notification.

Three settings correct this situation:

  • Exclude the VPN application from battery optimization in the system settings (Settings, Apps, Battery Optimization, then select “Not optimized” for the VPN client).
  • On Xiaomi or Redmi devices, disable background activity restrictions in the manufacturer’s specific settings, often grouped under a “Power Saving” or “App Management” menu.
  • Enable the “Always-on VPN” (or “Always-on”) setting in Android’s network settings, which asks the system to automatically restart the VPN connection if it is interrupted.

This last setting does not guarantee the absence of disconnection, but it reduces the duration during which traffic flows without protection.

Firewall, antivirus, and software conflicts on the workstation

A local firewall or antivirus that scans network traffic can interfere with the protocols used by the VPN. The conflict does not always manifest as a clear blockage: sometimes the connection establishes, works for a few minutes, and then is interrupted when the security software reevaluates active connections.

VPN protocols use specific ports. If the firewall closes or filters these ports after a period of inactivity, the VPN tunnel expires without the possibility of renegotiation. This behavior is common with enterprise firewalls configured to cut off inactive connections after a few minutes.

Check network filtering rules

Open the firewall settings and check that the ports used by the VPN client are allowed for inbound and outbound traffic. The ports vary by protocol: OpenVPN typically uses port 1194 in UDP, WireGuard uses a configurable UDP port, and IKEv2 uses ports 500 and 4500.

If an antivirus includes a module for inspecting HTTPS traffic or a “web shield,” it may directly conflict with the encrypted tunnel. Temporarily disabling this module can confirm if it is responsible for the disconnection. If the VPN connection remains stable without the module, an exclusion rule for the VPN client process resolves the issue without reducing overall protection.

IT technician in a server room consulting a VPN disconnection alert on a digital tablet

Network settings and VPN protocol: adjusting the configuration

The choice of VPN protocol directly influences connection stability. Some networks, particularly public Wi-Fi or corporate networks, block specific protocols or limit UDP traffic.

Switching from a UDP protocol to TCP, or changing protocols (for example, from OpenVPN to WireGuard, or vice versa), may be enough to bypass invisible network filtering. Most VPN applications offer this setting in their advanced options.

Adjust reconnection settings

Another often-overlooked setting concerns the automatic reconnection timeout. Some VPN clients abandon the reconnection attempt after a limited number of tries. Increasing this threshold or enabling the “unlimited automatic reconnection” option (when available) prevents the VPN from remaining disabled after a micro-network interruption.

Also check that the chosen VPN server is geographically close and not overloaded. A distant or saturated server increases latency, which can cause disconnections if the VPN client interprets the response delay as a loss of connection.

The automatic disconnection of a VPN rarely results from a single factor. On Windows, the Modern Standby mode remains the least documented trap. On Android, manufacturer overlays add a layer of complexity unique to each brand. In both cases, the solution lies in system settings rather than just the VPN client configuration.

How to Fix Automatic VPN Disconnection: Causes and Practical Solutions