Configuring OpenVPN to run automatically on system startup
Windows
- Download and install OpenVPN
- Save config file (ovpn) in C:\Program Files\OpenVPN\config folder.
- Create a txt file with the file name auth.txt. The first line being the user name and the second line being the password for your OpenVPN server.
- Save auth.txt folder in the C:\Program Files\OpenVPN\config folder.
- Edit the config/ovpn file and add the following line: auth-user-pass auth.txt
- Go to setting of OpenVPN and uncheck start on windows startup.
- Open Task Scheduler and create a Basic Task
- Start on user log on.
- The program will be: "C:\Program Files\OpenVPN\bin\openvpn-gui.exe"
- Add arguments: --connect "ENTER CONFIG FILE NAME HERE"
- Start task after network connection is established.