Page 1 of 1
GUI auto-connect
Posted: Sun Mar 11, 2018 8:32 pm
by mmilliss
Is there a way to have the GUI autoconnect on startup on Windows 10? I've had a look at the documentation and can't find a way to do this.
OR Can the Windows OpenVPNService be configured to connect at startup? I got this working by adding an "auth-user-pass password.txt" line to my config file but this means I now have the username and password in the clear on my file system which doesn't seem very secure and also I now can't use the gui to connect/disconnect.
I'm running OpenVPN 2.4.5 on Windows 10.
Any help appreciated.
Re: GUI auto-connect
Posted: Mon Mar 12, 2018 2:14 pm
by TinCanTech
You are stuck "between a rock and a hard place" ..
Openvpn only reads user/pass from a clear text file ..
The GUI cannot be used if you use the service to start openvpn ..
Re: GUI auto-connect
Posted: Mon Mar 12, 2018 8:09 pm
by mmilliss
*sigh*
Thanks for the reply. Do you know if there are any plans to improve this user experience? Is there somewhere I can request this feature?
Seems weird that a VPN, which is a good privacy/security tool, would use plaintext passwords in a file on my filesystem - it goes against everything I know about good security practices.
Re: GUI auto-connect
Posted: Mon Mar 12, 2018 8:52 pm
by TinCanTech
The new GUI will save encrypted passwords.
Re: GUI auto-connect
Posted: Mon Mar 12, 2018 9:04 pm
by mmilliss
Also, when just using the gui alone is there a way to get it to auto-connect on startup/login?
Re: GUI auto-connect
Posted: Mon Mar 12, 2018 9:07 pm
by mmilliss
TinCanTech wrote: ↑Mon Mar 12, 2018 8:52 pm
The new GUI will save encrypted passwords.
Is that the GUI with the latest version?
Re: GUI auto-connect
Posted: Mon Mar 12, 2018 9:08 pm
by TinCanTech
mmilliss wrote: ↑Mon Mar 12, 2018 9:07 pm
Is that the GUI with the latest version?
Always ..
Try: "openvpn-gui --help"
Edit: In fact all versions can auto start.
Re: GUI auto-connect
Posted: Thu Mar 15, 2018 11:16 am
by mmilliss
Thanks for the help but I'm running on windows and can't seem to find a way to pass the --connect command to the program using the windows services gui.
Re: GUI auto-connect
Posted: Thu Mar 15, 2018 12:28 pm
by TinCanTech
You can not use the Openvpn Service to start the Openvpn-GUI.
Re: GUI auto-connect
Posted: Thu Mar 15, 2018 8:28 pm
by mmilliss
I'm probably highlighting my lack of windows knowledge but the GUI is running when I login, isn't this started by the windows service?
I was hoping I could just add the --connect paramater to the start command and it would just work but it doesn't seem to be this way.
Re: GUI auto-connect
Posted: Thu Mar 15, 2018 9:00 pm
by TinCanTech
Search your registry for openvpn-gui
Re: GUI auto-connect
Posted: Thu Mar 15, 2018 9:19 pm
by mmilliss
Can I just say thanks again for your help on this, it's been much appreciated. I'll have a look when I get home tonight.
Re: GUI auto-connect
Posted: Fri Mar 16, 2018 9:14 am
by mmilliss
So I found this entry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\OpenVPNServiceInteractive and tried changing the ImagePath entry from this "C:\Program Files\OpenVPN\bin\openvpnserv.exe"
to this "C:\Program Files\OpenVPN\bin\openvpnserv.exe" --connect "AU Melbourne.ovpn"
but got an Error 1053: The service did not respond to the start or control request in a timely fashion.
then tried this "C:\Program Files\OpenVPN\bin\openvpnserv.exe --connect AU Melbourne.ovpn"
but got Error 2: The system cannot find the file specified
then this "C:\Program Files\OpenVPN\bin\openvpnserv.exe" "--connect AU Melbourne.ovpn"
but got this again Error 1053: The service did not respond to the start or control request in a timely fashion.
then this "C:\Program Files\OpenVPN\bin\openvpnserv.exe" "--connect" "AU Melbourne.ovpn"
but got this again Error 1053: The service did not respond to the start or control request in a timely fashion.
What am I doing wrong?
Re: GUI auto-connect
Posted: Fri Mar 16, 2018 12:58 pm
by TinCanTech
See my last post ...
Re: GUI auto-connect
Posted: Sat Mar 17, 2018 7:16 am
by mmilliss
I searched the registry and got a hit in all these locations.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\UFH\SHC
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Store
HKEY_CURRENT_USER\Software\OpenVPN-GUI
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\OpenVPN_UserSetup
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\bam\UserSettings\S-1-5-21-2742388443-2443409778-2540095943-1001
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\bam\UserSettings\S-1-5-21-2742388443-2443409778-2540095943-1002
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\bam\UserSettings\S-1-5-21-2742388443-2443409778-2540095943-1003
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\bam\UserSettings\S-1-5-21-2742388443-2443409778-2540095943-1001
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\bam\UserSettings\S-1-5-21-2742388443-2443409778-2540095943-1002
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\bam\UserSettings\S-1-5-21-2742388443-2443409778-2540095943-1003
HKEY_USERS\S-1-5-21-2742388443-2443409778-2540095943-1001\Software\Microsoft\Windows\CurrentVersion\UFH\SHC
HKEY_USERS\S-1-5-21-2742388443-2443409778-2540095943-1001\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Store
HKEY_USERS\S-1-5-21-2742388443-2443409778-2540095943-1001\Software\OpenVPN-GUI
Re: GUI auto-connect
Posted: Sat Mar 17, 2018 1:53 pm
by TinCanTech
Code: Select all
HKEY_CURRENT_USER/software/microsoft/windows/currentversion/run
Re: GUI auto-connect
Posted: Sun Mar 25, 2018 10:06 am
by mmilliss
I found the registry entry that you have referred to. Do I just create an entry for OpenVPNGUI with this value
C:\Program Files\OpenVPN\bin\openvpn-gui.exe --connect "AU Melbourne.ovpn"
Re: GUI auto-connect
Posted: Sun Mar 25, 2018 12:42 pm
by TinCanTech
You probably need the full path to the .ovpn file as well.
Re: GUI auto-connect
Posted: Thu Apr 19, 2018 9:56 am
by blackhiden
Make .bat file and put it to startup directory.
Unfortunately, this solution only work if you don't add password on your account