Ubuntu‎ > ‎VPN‎ > ‎

OpenVPN Access Server Client on Ubuntu

Openvpn's Access server  documents they have a problem with linux clients, which is the fact, that the dns doesn't work - and on Ubuntu it was not possible to import the downloaded client.ovpn in the Network Manager. (- see Caveat in this documentation : http://www.openvpn.net/index.php/access-server/docs/admin-guides/182-how-to-connect-to-access-server-with-linux-clients.html)

But it is possible to make it work with a little effort, and if the VPN connection is created in Network Manager, the DNS lookup actually works - although you probably still need to play with the search domain settings.

Here is how I made it work for me:

Create a new folder in your home dir - I called mine vpn.config
Copy your downloaded client.ovpn file into the new folder

Open client.opvn in an editor

Open a new file
Cut the lines between <ca> tags in client.ovpn
Paste into new file, save this file as ca.crt
Remove both <ca> tags from client.ovpn

Open a new file
Cut the lines between <cert> tags in client.ovpn
Paste into new file, save this file as client.crt
Remove both <cert> tags from client.ovpn

Open a new file
Cut the lines between <key> tags in client.ovpn
Paste into new file, save this file as client.key
Remove both <key> tags from client.ovpn

Open a new file - this is the last one :-)
Cut the lines between <tls-auth> tags in client.ovpn
Paste into new file, save this file as ta.key
Remove both <tls-auth> tags from client.ovpn

And remove this line:
key-direction 1


Now position the cursor in client.ovpn, right above the line # -----BEGIN RSA SIGNATURE-----

Insert the following lines

ca ca.crt
cert client.crt
key client.key
tls-auth ta.key 1

Save and close all the files.

Goto Network Manager -> Edit Connections ->VPN
click Import, browse to the modified client.ovpn in the folder you recently created - and where your certificates are, and import that file
Enter vpn username and password if prompted
On the VPN page, select Advanced
On the General Tab, uncheck the first option, "Use custom gateway"

Save

Use...