Tutorial

How To Install OpenVPN Access Server on Ubuntu 12.04

Published on June 21, 2013
How To Install OpenVPN Access Server on Ubuntu 12.04

Status: Deprecated

This article covers a version of Ubuntu that is no longer supported. If you are currently operate a server running Ubuntu 12.04, we highly recommend upgrading or migrating to a supported version of Ubuntu:

Reason: Ubuntu 12.04 reached end of life (EOL) on April 28, 2017 and no longer receives security patches or updates. This guide is no longer maintained.

See Instead:
This guide might still be useful as a reference, but may not work on other Ubuntu releases. If available, we strongly recommend using a guide written for the version of Ubuntu you are using. You can use the search functionality at the top of the page to find a more recent version.

Introduction

OpenVPN Access Server, from the official website is "a full featured SSL VPN software solution that integrates OpenVPN server capabilities, enterprise management capabilities, simplified OpenVPN Connect UI, and OpenVPN Client software packages that accommodate Windows, MAC, and Linux OS environments."

The installation of OpenVPN AS is much simpler compared to the traditional OpenVPN (without any GUI). Another great thing about about OpenVPN AS (Access Server) is that it has a mobile application for both Android and iOS platforms, enabling you to access your OpenVPN server on your smartphone as well.

Basic Server Setup

In this tutorial, we are using an Ubuntu 12.04 64-bit cloud server. Go ahead and create one to follow along. If you need help with this, you can refer to this tutorial here. After you have started up your cloud server, let's make some adjustments before we install OpenVPN AS. Please follow this guide to prepare our cloud server for installation.

Installing OpenVPN Acess Server

Let's begin by logging in as the root user. From here, download the OpenVPN AS package:

sudo wget http://swupdate.openvpn.org/as/openvpn-as-2.0.7-Ubuntu12.amd_64.deb

The above link is for 64-bit cloud servers since that is what we've decided to use. If by any chance you're using a 32-bit version, the download link would be:

sudo wget http://swupdate.openvpn.org/as/openvpn-as-2.0.7-Ubuntu12.i386.deb

To install OpenVPN AS, enter the following command:

dpkg -i openvpn-as-2.0.7-Ubuntu12.amd_64.deb 

If you are using a 32-bit cloud server, enter the following command instead:

dpkg -i openvpn-as-2.0.7-Ubuntu12.i386.deb

That's it. OpenVPN AS is now installed. However, there are still some things left to do before we can use it. During the installation, OpenVPN has created a default admin user called 'openvpn'. We need to set a password for 'openvpn'. To do that, enter the following command:

sudo passwd openvpn

You'll be prompted to enter your desired password. Make sure your password is secure.

Administration and Client Software Setup

OpenVPN AS web interfaces can be found at:

Admin  UI: https://YourIpAddress:943/admin
Client UI: https://YourIPAddress:943/

Replace "YourIPAddress" with your actual cloud server's IP address. Then, head over to the Client UI to use the access server. You'll see a big bad security warning. But don't be alarmed, it is perfectly okay since we've self-signed our server's SSL. Ignore the warning and click Ok/Proceed and you'll be prompted for username and password. Enter 'openvpn' as the username and the password should be what you've set for 'openvpn' before. After filling out username/password, click 'Go' and you'll see a screen like this:

openvpn

Download the 'OpenVPN Connect' software by clicking the link. After it has finished downloading, run it and enter your login credentials. And voilà! You are now connected to your OpenVPN Access Server.

You can login to the Admin UI if you need to make changes to your access server, although default settings works fine.

One more thing: remember that you can use OpenVPN access server with your smartphone? Download the official Android app here and the iOS app here.

Now, have fun with your OpenVPN Access Server!

Update:

As of OpenVPN Access Server v2.0, OpenVPN will no longer uses the 5.5.16.0/20 subnetwork for clients and will use the 172.27.240.0/20 subnet instead.

OpenVPN Access Server v2.0 Release Notes

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about our products

About the authors
Default avatar
chinmoy

author

Still looking for an answer?

Ask a questionSearch for more help

Was this helpful?
 
10 Comments


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

OK, so the nice folks over at openvpn.net finally answered me. The thread is here:

https://forums.openvpn.net/topic13529.html in case anyone wants to know the nitty gritty. Thanks to Will in DO’s TS as well!

The TLDR version - go to https://yourvpnaddress.tld:943/admin/advanced_vpn

for the client and server both (at the bottom), add these lines:

cipher AES-256-CBC keysize 256 auth sha256

under both server and client config directives. Save the changes so it reloads the new config. It didn’t explicitly say to download a new client after this, but I did this anyway, figuring it couldn’t hurt.

The answer to #1 is outlined clearly in the tread I linked above. Number 2 wasn’t addressed in that thread, but what I did to verify it was download a new client from my VPN server to look at the fresh logs. When it does it’s initial handshake, you have an opportunity to see the technical details about the connection. What I wanted to verify was found at the very bottom of the log files:

cipher AES-256-CBC auth sha256

To update OpenVPN to the latest version once it is already installed, you can perform the following steps. This will be different from what is posted in the directions above, as the OS build number and version number of OpenVPN will change from time to time. This works for when you only want to upgrade OpenVPN - not the whole system.

  1. In a browser navigate to http://openvpn.net/index.php/access-server/download-openvpn-as-sw/113.html?osfamily=Ubuntu

  2. Right click and copy the link to the current package appropriate to you.

  3. In a shell (once you are connected to your VPN) type:

sudo wget

Then put a space and paste what you have copied from OpenVPN’s downloads page in step 2. In my case it was:

swupdate.openvpn.org/as/openvpn-as-1.8.5-Ubuntu12.amd_64.deb

The OpenVPN version number and server build number are the ones that will likely change based on your setup, which is why we need the current path.

The complete command you will enter will look something like:

sudo wget swupdate.openvpn.org/as/openvpn-as-1.8.5-Ubuntu12.amd_64.deb

  1. After the updated package downloads, type:

sudo dpkg -i openvpn-as-1.8.5-Ubuntu12.amd_64.deb (same theory applies as noted in step 3)

  1. You should see something like:

Preparing to replace openvpn-as 1.8.4-Ubuntu10 (using openvpn-as-1.8.5-Ubuntu12.amd_64.deb) … Upgrade detected (debian)… Unpacking replacement openvpn-as … Setting up openvpn-as (1.8.5-Ubuntu12) … Backing up configuration and DB files to /usr/local/openvpn_as/etc/backup prior to update.

  • Restarting openvpnas openvpnas user@domain $
  1. You’re upgraded and all set at this point.

To anyone to is having issues connecting to the webpage.

By default the setup does not select the correct interface.

After you run this command

dpkg -i openvpn-as-(whatever version your installing)

You need to run this command

/usr/local/openvpn_as/bin/ovpn-init

It will ask you to delete the configuration. This is fine as this is a brand new install.

Type

DELETE

Enter Yes if you agree Yes this is the primary AS node

**Now this is the important part. You want to specify option 1 all interfaces: **

1

The rest of the setup you most likely want to leave at the defaults, just press enter to confirm until you are done.

That should be it, you can continue on the next step of setting up a password for the openvpn user

sudo passwd openvpn 

once done you should now be able to access the webpage.

https://your-ip:943/admin

Is this not working for anyone else? The web access links end on a “ERR_CONNECTION_FAILED” from chrome.

Please specify the network interface and IP address to be used by the Admin Web UI: (1) all interfaces: 0.0.0.0

It worked!

@gokhanbozalp I’ve the same issue, were you able to fix the problem? let me know…

The error I’m getting is ‘Failed to connect to SERVER IP ADDRESS port 943: Connection refused’

Hej Folks, sudo wget http://swupdate.openvpn.org/as/openvpn-as-2.0.24-Ubuntu14.amd_64.deb dpkg -i openvpn-as-2.0.24-Ubuntu14.amd_64.deb sudo passwd openvpn

After setting up latest openvpn with commands above, I cannot reach Admin UI: https://YourIpAddress:943/admin or Client UI: https://YourIPAddress:943/

I am absolutely a newbie and pls help as easy as possible.

Test Results for TCP Result: Error Explanation: Could not connect to the test server on the Internet. IP Address Tested: (not found) Reverse DNS result: (unknown)

I got openVPN installed on the server. But I can’t install the driver on my windows 7 machine. i keep getting ‘can’t install tun/tap driver exit code 2’. i’ve tried searching the internet for available solutions but nothing seems to work. help

I have a question , so i did this whole tutorial and it works great but how can i connect this when i get out of my home network , lets say if i go away the openvpn client would not connect only when im connected home …

thanks

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Join the Tech Talk
Success! Thank you! Please check your email for further details.

Please complete your information!

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more