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: 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:

    • 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 :

Download the package for your system from here:

Lets take Centos for example

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/