Installing OpenVPN on Ubuntu 12.04

The company I have been working for for a couple of months has an OpenVPN server running. Recently I wanted to install the client software on my Windows 7 desktop and my Linux laptop.

Our IT guy kindly supplied me with a executable to install and configure the client under Windows and a config file and certificates for Linux.

Windows 7 worked immediately but under Linux I had to do some extra steps to get it working properly. I’ll document them here for future reference and maybe other people running in to the same issues.

I had previously installed OpenVPN under linux and hoped the config file would be all I needed. When running

openvpn –config configfile.ovpn

I got the error message:

Options error: Unrecognized option or missing  parameter(s) in configfile.ovpn:11: verify-x509-name (2.2.1)
Use –help for more information.

Some digging around showed the “verify-x509-name” command was implemented starting at OpenVPN version 2.3. Using

apt-get install openvpn

and the default repositories in Ubuntu the installed version was 2.2.1

To get the latest version, I uninstalled the current installed version using

apt-get purge openvpn

then downloaded and untarred the latest version from the community downloads (at this time 2.3.6)

wget http://swupdate.openvpn.org/community/releases/openvpn-2.3.6.tar.gz

tar -zxvf ./openvpn-2.3.6.tar.gz

Installing should work this way:

cd ./openvpn-2.3.6

./config && sudo make && sudo make install

but I ran into dependency problems. Some error messages came up regarding the LZO package.

configure: error: lzo enabled but missing

I found this page by Droidzone describing the dependencies and some useful information on how to find missing dependencies during future installs. Worth a read.

In short:

sudo apt-get install libssl-dev liblzo2-dev libpam0g-dev

will install the necessary dependencies. After this the installation went fine:

openvpn –version

OpenVPN 2.3.2 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [eurephia] [MH] [IPv6] built on Dec 24 2014

Advertisement

10 thoughts on “Installing OpenVPN on Ubuntu 12.04

  1. Hi, I managed to get to “./config && sudo make && sudo make install” then I get
    ./config No such file or directory.

    Any chance you can point me in the right direction please?

    I also installed the dependencies and tried again

    Lee

    • Ah, that’s good to know!
      Reinstalled my system from scratch a while ago (running 15.10 64-bit on my main system right now), but haven’t gotten around installing OpenVPN yet…
      After I try it out on 15.10, I’ll update the info.

      Regards,
      Dieter

  2. Thank you for posting this awesome article. I’m a long time reader but I’ve
    never been compelled to leave a comment. I subscribed to your blog and shared it on my Twitter.
    I will come back for sure to check your future articles!

  3. Thank you for this tutorial ! However I change the command : ./config && sudo make && sudo make install to ./configure && sudo make && sudo make install .

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s