OpenVPN Access Server on Centos VPS

From vpsget wiki
Jump to: navigation, search

You can install OpenVPN Access Server on VPS. Please note : free OpenVPN-AS supports only 2 clients


    • Prepare:

VPSGet.com customers can skip this OpenVZ-related step

You should be sure that the node have all necessary kernel modules.

modprobe ipt_mark
modprobe ipt_MARK
modprobe tun

Also check /etc/vz/vz.conf. “ipt_state iptable_nat” should be present in the list of IPTABLES modules.

Allow TUN/TAP if not enabled before:

vzctl stop <CID>  
vzctl set <CID> --devices c:10:200:rw --save
vzctl set <CID> --capability net_admin:on --save 

Or use the admin vps management panel.

Start the container

vzctl start <CID>

After container was started run this commands on the node:

vzctl exec <CID> mkdir -p /dev/net
vzctl exec <CID> mknod /dev/net/tun c 10 200
vzctl exec <CID> chmod 600 /dev/net/tun

Rewrited from here: http://www.linuxtutorial.co.uk/openvpn-iptables-service-not-started-because-of-error-svc_run_except/


    • Install OpenVPN Access Server

Now you can download and install OpenVPN-AS. Be sure that you using clean system and no openvpn daemon was installed before. Official OpenVPN Access Server Guide you can find here :http://openvpn.net/index.php/access-server/docs/quick-start-guide.html

Download the package for your system from here: http://openvpn.net/index.php/access-server/download-openvpn-as-sw.html

Lets take Centos for example

wget http://swupdate.openvpn.org/as/openvpn-as-2.0.3-CentOS6.i386.rpm
rpm -i openvpn-as-2.0.3-CentOS6.i386.rpm

After install change password for openvpn user:

passwd openvpn

To start Openvnp AS at VPS reboot:

chkconfig openvpnas on

Access Server web UIs are available here:

Admin  UI: https://<Your_VPS_IP>:943/admin
Client UI: https://<Your_VPS_IP>:943/