Skip to content

Installation

Federico Sartini edited this page Apr 14, 2015 · 8 revisions

Installation

Compile ovpnctrl daemon

Requirements:

  • GCC 4.7
  • libmysql
  • libpthread

Instructions:

$ cd ovpnctrl/Debug
$ make clean
$ make all
$ make install

Prepare database

  • create an empty database:
CREATE DATABASE <vpnman_db_name>; 
  • create a new mysql user to be used by vpnman
GRANT ALL PRIVILEGES ON <vpnman_db_name>.* TO <vpnman_db_user>@localhost IDENTIFIED BY <vpnman_db_pass>; 
  • restore database
$ mysql -u <vpnman_db_user> -p <vpnman_db_name> < db/vpnmandb.sql

Install frontend

Requirements:

  • apache2
  • php5
  • libapache2-mod-php5
  • php5-mysql

Instructions:

  • Set <vpnman_db_user>, <vpnman_db_pass> and <vpnman_db_name> in frontend/include/config.inc.php
  • Using visudo, add the following line to the sudoers file:
<apache> ALL=(ALL) NOPASSWD: <your_vpnman_path>/vpn/bin/openvpn.sh

NOTE: 'apache' is the apache web server user, some system may use different user (for example 'www-data')

Firewall:

By default, when you start a vpn, VPNMAN add a rule to the "allow_vpn" chain. You have to create this chain and insert it to your INPUT chain:

$ iptables -N allow_vpn
$ iptables -A INPUT -j allow_vpn

Default Login:

username: admin
password: alpha0000

Clone this wiki locally