How to install and configure OpenVPN on Centos 5

This is tutorial on how to install and configure OpenVPN in a few easy steps on Centos 5.


  • Make sure you have Centos 5 installed on the vps, if you have another OS you can reinstall the vps from Hypanel -> Machine settings.
  • Activate TUN/TAP and PPP from Hypanel (instructions here)
  • Login to the vps via ssh using putty or any other ssh client
  • Download the openvpn installation script:


  • Make the script executable:
chmod +x
  • Run the script
  • Follow the instructions from the script
  • When you are done with the installation you need to copy clientkeys.tgz from /etc/openvpn/keys/ to your PC (you can do this with winscp for example)

Install OpenVPN on the client side (windows)

  • If the PC where you want to use the VPN is a Windows client you can download and install the OpenVPN gui from here
  • We recommend installing OpenVPN in C:\OpenVPN
  • Create a folder named "VPN" in C:\OpenVPN\config\
  • Extract clientkeys.tgz to C:\OpenVPN\config\VPN\
  • If you are running Windows Vista/7/8/10 right click on the OpenVPN icon, click Properties, go to Compatibility and activate "Run this program as an administrator".
  • Right click on the OpenVPN icon (it should be red) from the tray and click "Connect", after succesfully connecting the icon should be green and you should have the VPS Ip if you check on


Thanks to Denis D. from for creating most of the openvpn installation script.


  • 222 Users Found This Useful
Was this answer helpful?

Related Articles

How to enable swap inside your VPS

Contact us and we will add a 512Mb swap for you.

How to change your VPS date/time

Since we have a lot of people from all around the world almost anyone will need to have his VPS...

How to mount /tmp and /var/tmp with noexec nosuid

You may want to mount /tmp and /var/tmp with noexec and nosuid on your VPS especially if you want...

Hypanel DNS

We have quite a lot of questions regarding the Hypanel DNS service, how to use it and when. 1....

Ubuntu 9.10 upgrade

Due to the recent changes to the Ubuntu init sistem, upgrading an OpenVZ VPS to Ubuntu 9.10 will...