Ways to use the built-in OpenVPN client with a pre-configured .ovpn file via IGEL

As some of you have seen, I’ve been working on a way to use the built-in OpenVPN client with a pre-configured .ovpn file.

I have the following solution which I have confirmed as working with another user on a different VPN. It’s a WIP and currently has quite basic functionality. Any suggestions or improvement would be appreciated!

• in the UMS, right click on Files, select New File

• browse for your .ovpn file

• set the Devices File location as /wfs/

• hit OK and the file should now be in the UMS

• assign this file object to a test device

• create a new profile and call it something like OpenVPN Connection

• open the profile and go to System > Firmware Customization > Custom Commands > Network> Final network command

• paste the following command into that field, after replacing example.ovpn with the correct filename

• `while :; do if [ -z $(pgrep openvpn) ]; then echo “openvpn is not running”; openvpn –config /wfs/example.ovpn –auth-user-pass <(echo -e $(zenity –forms –text=”Enter your VPN credentials” –add-entry=Username –add-password=Password –title=OpenVPN) | sed ‘s/|/n/’); else echo “openvpn is running”; fi; sleep 1; done &`

• save this profile and assign it to the test device

• reboot the device and you should now see a login window for OpenVPN

• if you login with empty/incorrect credentials or the OpenVPN client fails for some reason, the login window will reappear

• if you login successfully, you will see a “Networking connecting” popup appear briefly – you won’t see any other indicator however and there isn’t an option to disconnect after you have connected except rebooting the thin-client

• to remove this OpenVPN connection from the settings, unassign the profile from the thin-client and reboot it

Continue reading and comment on ‘Ways to use the built-in OpenVPN client with a pre-configured .ovpn file via IGEL’.  Not a member? Join Here!

Learn more, search the IGEL Knowledge Base

Ask a question or comment on the above message thread?

Join or log in to the IGEL Community to ask us anything and meet other IGEL customers, partners, and EUC enthusiasts.

Submit a question, or Join Today!

Popular Message Threads

Categories & Tags: