Openvpn – windows openvpn client as service, choose config file

openvpn

Win10 roadwarrior laptops dont' have admin privileges. So openVPN client GUI can't be used since it edits the system routing table; thus requires admin. privs.

So, we allow the openVPNservice to run as admin, then put start/stop VPN .bat files on desktop that call:

net start openvpnservice

or

net stop openvpnservice

This works well and allows roadwarrior laptops to connect to corporate network while traveling.

But, we have several offices around the country, each with their own replicated file servers. I'd like to setup openVPN config. files for each office on the roadwarrior laptops so users could connect to the closest VPN server and DFS-N would refer a file server matching their VPN subnet, thus fetching files from the office closest to them.

The openVPN docs say that openvpnservice will attempt to start an openVPN process/tunnel for each .ovpn file it finds in the c:\programfiles\openvpn\config directory.

Does anyone know how to specify which .ovpn config file to connect to when using the windows openVPNservice? I don't want concurrent tunnels to each VPN server, just let the user pick which one to connect to.

Best Answer

Since OpenVPN 2.4 there is the interactive service and the client doesn't need admin privileges anymore. You should try to upgrade your clients and simply use the GUI.