Description
In certain environments, it is required to establish a VPN connection before a user logs in to Windows, for example to enable domain authentication against remote infrastructure.
By default, OpenVPN connections are only available after user logon.
To enable Start Before Logon (SBL) using the Pre-Logon Access Provider (PLAP) with OpenVPN GUI, follow these steps:
1. Install OpenVPN GUI
Install the OpenVPN GUI client on the Windows system.
2. Enable PLAP in OpenVPN GUI
- Open the system tray (taskbar hidden icons).
- Right-click on the OpenVPN GUI icon.
- Open Settings.
- Enable Pre-Logon Access Provider.
- Confirm with OK.
3. Download and Prepare the Connection Profile
- Download the
.ovpnconnection profile from the OpenVPN Access Server Client Web UI. - Open the file in a text editor.
- Add the following lines:
management 127.0.0.1 12345
management-hold
management-query-passwords
Optional parameters
- For TOTP MFA:
auth-retry interact
- For SAML authentication:
setenv IV_SSO webauth
- Save the file.
4. Deploy the Configuration
- Copy the modified
.ovpnfile to:
C:\Program Files\OpenVPN\config-auto
- Open a PowerShell with administrative privileges.
- Restart the OpenVPN service:
Restart-Service OpenVPNService
- Reopen OpenVPN GUI.
The profile should now appear under Persistent Profiles.
If the profile does not appear, reboot the system.
5. Test Pre-Logon VPN
- Lock or reboot the Windows system.
- On the Windows login screen, a network/VPN icon will be visible.
- Click the icon.
- Select the VPN profile.
- Enter VPN credentials when prompted.
- The system connects to the VPN before Windows logon.
Result
After completing these steps, users can establish a VPN connection directly from the Windows logon screen, enabling authentication against remote services such as Active Directory.
Notes
- The configuration relies on OpenVPN GUI with PLAP support.
- The
.ovpnfile must be placed in theconfig-autodirectory to be available pre-logon. - Service restart (or system reboot) is required to apply the configuration. (support.openvpn.com)