~/home/blogs/auto-connect-to-openvpn-on-bootup.md

Auto-Connect to OpenVPN On Bootup?

Setting up OpenVPNConnector to connect as a service is easy. Here's how to do it.

- Raul G.
2021-02-24

I've been working on some new infrastructure at Professional Financial Solutions lately. It's been pretty fun and interesting stuff.

Covid has forced many businesses to embrace remote work, but luckily, we never had any problems with remote work in the first place.

The use of remote work does complicate things in regards to system administration though.

For example, we recently started leveraging Active Directory to manage our users and computers, as well as apply a policy-driven SysAdmin solution. This means that all computers need to have a secure connection to the Domain controller.

I used OpenVPN to host a VPN gateway on-site and in the cloud where we are hosting a DC. This allows me to route packets between our on-site network and the cloud network seamlessly. The problem arrises with users who occasionally work from home. They need their connection to be available regardless of what network they're using.

OVPN Connector


Luckily, all we need to do here is install OpenVPN Connect on the client computers. 

OpenVPN Connect comes with a binary called ovpnconnector.exe in the Program directory. You can read more about it here.

Long story short, ovpnconnector is a command line utility to install the OpenVPN Connector service. Simply create a client ovpn file and name it ovpnconnector.ovpn.

Then, drop that file in the same directory as the executable.

Finally, using an elevated command prompt, navigate to the program folder and run:


ovpnconnector.exe install
ovpnconnector.exe start

Those commands will install the OVPN profile and run it as a service. This will ensure that the VPN tunnel is initialized before the user has even signed in.

It's perfect for use in an Active Directory environment.

Hope this was helpful to some of you,

Thanks for reading!

Share this post