Page 1 of 1

Auto connect client

Posted: Sat Apr 27, 2019 3:19 am
by mrjohn
Hi
Is there a easy and safe way in v.2.4.7 to autoconnect client without using windows scheduled task or saving password to plain text?
thanks

Re: Auto connect client

Posted: Mon May 13, 2019 9:55 am
by mrjohn
for client side I've solved using scheduled task for opening openvpn-gui.exe and add config file to task argument: --connect config.ovpn
but for server,in case of a windows update+restart if user not log in,all connections for clients will be down :(

Re: Auto connect client

Posted: Wed May 15, 2019 10:11 am
by novaflash
With OpenVPN Access Server, you can obtain an auto-login profile, which doesn't require credentials to establish a connection.

You can install the open source OpenVPN client on Windows, and enable the openvpn service component. It can read such an auto-login profile from the c:\program files\openvpn\config\ directory and start that connection up at start-up time, even before you login to your Windows system. It is entirely in the background.

Re: Auto connect client

Posted: Thu Jun 17, 2021 2:46 am
by carlostico
novaflash wrote:
Wed May 15, 2019 10:11 am
With OpenVPN Access Server, you can obtain an auto-login profile, which doesn't require credentials to establish a connection.

You can install the open source OpenVPN client on Windows, and enable the openvpn service component. It can read such an auto-login profile from the c:\program files\openvpn\config\ directory and start that connection up at start-up time, even before you login to your Windows system. It is entirely in the background.
Hi, I tried to follow the instructions but the client is not auto-starting any ideas?
Copied the fie to c:\program files\openvpn\config\ and c:\program files\openvpn\config-auto but nothing

Re: Auto connect client

Posted: Thu Jun 17, 2021 6:18 pm
by chilinux
As far as I know, the prefer client for OpenVPN AS is now OpenVPN Connect v3 which can be found here:
https://openvpn.net/client-connect-vpn-for-windows/

If you want to continue to use OpenVPN Community Edition and OpenVPN-GUI, I recommend upgrading to at least version 2.4.11 or higher. It can be found here:
https://openvpn.net/community-downloads/

For OpenVPN CE, may also want to try putting the configuration file in:
\Users\$USERNAME\OpenVPN\config

Lastly, you may also want to consider upgrading to OpenVPN Access Server version 2.9.0 which modifies the server-locked profiles to be compatible with OpenVPN Community Edition.

Re: Auto connect client

Posted: Tue Jun 29, 2021 12:51 pm
by openvpn_inc
Hello carlostico,

Auto-login profiles do not require credentials to establish a connection, so are ideal for service background connections. On OpenVPN community edition a service daemon comes with it that allows to run connections under a service daemon. It will by default load profiles from the 'config-auto' directory and start them, if the service is enabled. This requires you to setup OpenVPN's service component. This document describes that:
https://openvpn.net/community-resources ... s-service/

OpenVPN Connect v3 now also has a service daemon mode for Windows.
https://openvpn.net/vpn-server-resource ... emon-mode/

OpenVPN Connect v3 also has a simple setting in the configuration that allows to reconnect on reboot.

Kind regards,
Johan

Re: Auto connect client

Posted: Wed Nov 03, 2021 3:12 pm
by roman86
Is it possible to install the app and apply the profile automatically by sccm?
openvpn_inc wrote:
Tue Jun 29, 2021 12:51 pm
Hello carlostico,

Auto-login profiles do not require credentials to establish a connection, so are ideal for service background connections. On OpenVPN community edition a service daemon comes with it that allows to run connections under a service daemon. It will by default load profiles from the 'config-auto' directory and start them, if the service is enabled. This requires you to setup OpenVPN's service component. This document describes that:
https://openvpn.net/community-resources ... s-service/

OpenVPN Connect v3 now also has a service daemon mode for Windows.
https://openvpn.net/vpn-server-resource ... emon-mode/

OpenVPN Connect v3 also has a simple setting in the configuration that allows to reconnect on reboot.

Kind regards,
Johan

Re: Auto connect client

Posted: Fri Nov 05, 2021 10:36 am
by openvpn_inc
Hello roman86,

Yes, OpenVPN Connect v3 has a command line interface. So if you provide the installer, the configuration profile, and a batch script that runs through the necessary commands, SCCM can take that batch file and run it and the necessary steps are then automated. That's one way to do it, it can be done with other scripting tools as well, I just mentioned a somewhat simple example.

https://openvpn.net/vpn-server-resource ... n-connect/

Kind regards,
Johan