Windows Persistency With OpenVPN GUI

OpenVPN GUI will automatically run the following batch files if it exists. No changes to config file is needed, just drop the batch file in place. Possible privilege escalation if user runs OpenVPN GUI with administrator privileges and uses a VPN config in his home directory.

  1. %HOMEPATH%\OpenVPN\config\(config name)_pre.bat (Before connection initiated)
  2. %HOMEPATH%\OpenVPN\config\(config name)_up.bat (After connection setup)
  3. %HOMEPATH%\OpenVPN\config\(config name)_down.bat (After connection teardown)
  4. %PROGRAMFILES%\OpenVPN\config\(config name)_pre.bat
  5. %PROGRAMFILES%\OpenVPN\config\(config name)_up.bat
  6. %PROGRAMFILES%\OpenVPN\config\(config name)_down.bat