Friday, August 25, 2017

Configuring OpenVPN to run automatically on system startup

Windows




  1. Download and install OpenVPN
  2. Save config file (ovpn) in C:\Program Files\OpenVPN\config folder.
  3. 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.
  4. Save auth.txt folder in the C:\Program Files\OpenVPN\config folder.
  5. Edit the config/ovpn file and add the following line: auth-user-pass auth.txt
  6. Go to setting of OpenVPN and uncheck start on windows startup.
  7. Open Task Scheduler and create a Basic Task
  8. Start on user log on.
  9. The program will be: "C:\Program Files\OpenVPN\bin\openvpn-gui.exe"
  10. Add arguments: --connect "ENTER CONFIG FILE NAME HERE"
  11. Start task after network connection is established.