Today I want to show you how to auto-connect a VPN connection after the windows login. First, you need to deactivate the automatic start of the openvpn-gui.exe. At Windows 10, go to your Taskmanager and deactivate this entry:
now go to your startup folder and create a shortcut for this path:
“[Filepath]openvpn-gui.exe” –config_dir “[YourConfigFolderWithYourOVPNfile]” –connect [YourConfigFile].ovpn
C:\Program Files (x86)\Sophos\Sophos SSL VPN Client\bin\openvpn-gui.exe” –config_dir “C:\Program Files (x86)\Sophos\Sophos SSL VPN Client\config\VPNuser42@utm.company.com” –connect VPNuser42@utm.company.com.ovpn
To connect the client without typing in your username and password, you can edit your OVPN-file. Change “auth-user-pass” to “auth-user-pass pass.txt” and save the file. Create a new pass.txt in your config folder. Write your username in the first line and your password in the second line. Example:
Keep in mind that this file is unencrypted on your harddisk! In case of using active directory authentication, you need to change this password after a password-change within your company.