tutorial VPS install openvpn on centos 6

tutorial VPS install openvpn on centos 6, many people ask me how to install openvpn on centos 6.3 because many people failed install openvpn to their linux centos 6. failed install openvpn linux centos 6 and how to fix this, you should must check every step and why open vpn failed start or wrong configuration. if you need how to install openvpn on centos 5 you can see this link ==> install openvpn centos 5

ok, lets try step by step install openvpn with linux centos 6.x

first lets check

and output :
#crw------- 1 root root 10, 200 Jun 15 21:07 /dev/net/tun
if not enable you can request enable tun / tap to your vps provider, usually vps with openvz virtualization they disable tun/tap by default, to enable this you can request and ask to your provide vps
we need install package for openvpn install them :

now we needed download openvpn and lzo :

Install LZO first

LZO centos 6 64bit

LZO centos 6 32bit

before installing openvpn you need pkcs

centos 6 64bit

centos 6 32bit

 

now after complete you need install openvpn on your centos 6

with centos 6 64bit

with centos 6 32bit

 

done, now you have openvpn on your OS, but you need configuration and setting to your server, and make good running this openvpn.

if you dont have easy-rsa lets make this available with same version openvpn,

copy easy-rsa folder to /etc/openvpn

check are on that folder contain file openssl.cnf ?

if you dont have that file or openvpn not found openssl.cnf lets you can copy or rename openssl-1.0.0.cnf become openssl.cnf use command :

ok, now same like install openvpn on centos 5

creating and build ca certified

if you read question you can skip just answer “Common Name”

we need build key server

build Diffie Hellman

now almost done tutorial install openvpn on centos, but we need build and manage all openvpn file to easy manage and create user etc.

copy all to /etc/openvpn/keys to make you easily manage your open VPN letter

tutorial centos

go to directory /etc/openvpn/

before create config server, you may need backup first

edit server.conf, you need put it blank and write text dev tun

delete all text and put only text dev tun

now we need create config for server, example we need and use tcp on port 443

then write this :

see line with text server 10.8.0.0 255.255.255.0 (remember this)

 

now see are your openvpn running work fine or not, use command

if not running fine, you can see from first and check again on config443.conf, or for first troubleshooting openvpn not work fine you can delete first config443.conf and restart again openvpn, if your script running lets do next step.

 

Enabling packet forwarding :

 

check again on your config remember line server 10.8.0.0 now Edit NAT table for MASQUERADING (if you have XEN VPS or Dedicated Server) use command :

if you have vps you can use command :

 

configure client :
now download openvpn client to your windows system http://openvpn.se/files/install_packages/openvpn-2.0.9-gui-1.0.3-install.exe
download ca.crt in directory /etc/openvpn/keys/
create file and put in : c:\program files\openvpn\config
client
dev tun
proto tcp
remote 70.99.166.214 443
resolv-retry infinite
route-method exe
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
auth-user-pass
comp-lzo
verb 3

last we needed create account :

create password

then restart openvpn

and connect to your openvpn and enjoy your vpn server, tutorial centos how easy install and configure openvpn on centos 6

Leave a Reply

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