OpenVPN server inside OpenVZ container

This article is about setting up an OpenVPN server inside OpenVZ container.

This comes handy when you need your IP to be (long term) static and/or from specific country/continent.

First thing to do is to get yourself OpenVZ conainer (maybe from one of the Linux VPS providers). I have tested OVH (Europe) and TekTonic (USA), but this howto should work with any provider and also in any virtual machine flavour (KVM, VMware, Xen).

This howto is based on Ubuntu Server 14.04 LTS.

Login to your Ubuntu server and make it up-to-date (apt-get update;apt-get upgrade).

Now install OpenVPN and easy-rsa tools for creating certificates.

apt-get install openvpn easy-rsa
cp -r /usr/share/easy-rsa /etc/openvpn/

FIrst, you have to create server certificate for encrypted connection through VPN.

cd /etc/openvpn/easy-rsa
vi vars

 

This article is not yet complete!

Leave a Reply

Your email address will not be published. Required fields are marked *