Auto connect client

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
mrjohn
OpenVpn Newbie
Posts: 18
Joined: Thu Apr 04, 2019 7:24 am

Auto connect client

Post by mrjohn » Sat Apr 27, 2019 3:19 am

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

mrjohn
OpenVpn Newbie
Posts: 18
Joined: Thu Apr 04, 2019 7:24 am

Re: Auto connect client

Post by mrjohn » Mon May 13, 2019 9:55 am

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 :(

User avatar
novaflash
OpenVPN Inc.
Posts: 1073
Joined: Fri Apr 13, 2012 8:43 pm

Re: Auto connect client

Post by novaflash » 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.
I'm still alive, just posting under the openvpn_inc alias now as part of a larger group.

carlostico
OpenVpn Newbie
Posts: 2
Joined: Wed Jun 16, 2021 11:29 pm

Re: Auto connect client

Post by carlostico » Thu Jun 17, 2021 2:46 am

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

chilinux
OpenVPN Power User
Posts: 156
Joined: Thu Mar 28, 2013 8:31 am

Re: Auto connect client

Post by chilinux » Thu Jun 17, 2021 6:18 pm

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.

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1333
Joined: Tue Feb 16, 2021 10:41 am

Re: Auto connect client

Post by openvpn_inc » 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
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

roman86
OpenVpn Newbie
Posts: 1
Joined: Wed Nov 03, 2021 3:11 pm

Re: Auto connect client

Post by roman86 » Wed Nov 03, 2021 3:12 pm

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

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1333
Joined: Tue Feb 16, 2021 10:41 am

Re: Auto connect client

Post by openvpn_inc » Fri Nov 05, 2021 10:36 am

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
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

Post Reply