How to Install OpenVPN on CentOS

I’ve successfully tested it on my SSD VPS with 128mb Memory, and it should work on any other OpenVPS too.

Check if cat /dev/net/tun is enabled.

Add extra respository

For CentOS 5 32bit

Edit export KEY_EMAIL=”me@somethingemail.com” to your email address

Login root go to /etc/openvpn/easy-rsa/2.0/keys via WinSCP to download below 3 files to your computer.

Edit remote IP to your VPS/Dedicated Server IP address
rename client.crt and client.key to client1.crt and client1.key.

Delete the semicolon in front of push “redirect-gateway def1 bypass-dhcp”

Change

to

insert following lines to the file before
touch /var/lock/subsys/local

add following line to the file.

Log in to your server again with winScp to root directory, download client.conf to your PC where you have other three files and rename the file client.conf to client1.ovpn

If you use free windows openvpn client, you have to copy all 4 files which include ca.crt, client1.crt, client1.key, client1.ovpn to the configuration folder in order to successfully establish connection.

If you use Viscosity as your Mac client, you only need to import client1.ovpn file to establish the VPN connection.

One thought on “How to Install OpenVPN on CentOS”

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">