You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Paul Rock a7172106ee new envs added, static path added into to vpn scripts, new question on installation stage about path to scripts, tunes for more flexibility of scripts 7 years ago
.github Add github issue template 8 years ago
app client config generating part was rewrited to plugin 7 years ago
configs new envs added, static path added into to vpn scripts, new question on installation stage about path to scripts, tunes for more flexibility of scripts 7 years ago
public client config generating part was rewrited to plugin 7 years ago
scripts new envs added, static path added into to vpn scripts, new question on installation stage about path to scripts, tunes for more flexibility of scripts 7 years ago
.env.example new envs added, static path added into to vpn scripts, new question on installation stage about path to scripts, tunes for more flexibility of scripts 7 years ago
.gitignore fonts task added in gulp 7 years ago
CHANGELOG.md Update version 0.3.2 8 years ago
LICENSE.md Update to AGPL licence 8 years ago
README.md readme file updated 7 years ago
composer.json new plugin was added 7 years ago
gulpfile.js small refactoring, check for non existed env file added 7 years ago
package.json refactoring and migration from npm+bower to npm+gulp 7 years ago

README.md

OpenVPN Admin

Summary

Administrate its OpenVPN with a web interface (logs visualisations, users managing...) and a SQL database.

Previsualisation configuration Previsualisation administration

Prerequisite

  • GNU/Linux with Bash and root access
  • Fresh install of OpenVPN
  • Web server (NGinx, Apache...)
  • MySQL
  • PHP >= 5.5 with modules:
    • zip
    • pdo_mysql
  • composer
  • npm
  • unzip
  • wget
  • sed
  • curl

Debian Stretch

# apt-get install openvpn nginx composer php-fpm php-mysql mysql-server php nodejs unzip git wget sed curl
# ln -s /usr/bin/nodejs /usr/bin/node

Debian Jessie

# apt-get install openvpn apache2 php5-mysql mysql-server php5 nodejs unzip git wget sed npm curl
# npm install -g bower
# ln -s /usr/bin/nodejs /usr/bin/node

CentOS 7

# yum install epel-release
# yum install openvpn httpd php-mysql mariadb-server php nodejs unzip git wget sed npm
# npm install -g bower
# systemctl enable mariadb
# systemctl start mariadb

Other distribution... (PR welcome)

Tests

Only tested on Debian Jessie. Feel free to open issues.

Installation (full)

  • Setup OpenVPN and the web application:

    $ cd ~/my_coding_workspace
    $ git clone https://github.com/Chocobozzz/OpenVPN-Admin openvpn-admin
    $ cd openvpn-admin
    $ npm install
    $ composer install
    

You can predefine all environment parameters, just copy example and put your changes in .env

# cp .env.example .env

If you want to make ths full installation (with preparing of MySQL, Web-server and OpenVPN)

# ./install.sh www_base_dir web_user web_group

If you want to configure only OpenVPN:

# ./install-openvpn.sh
  • Setup the web server (Apache, Nginx...) to serve the web application.
  • Create the admin of the web application by visiting http://your-installation/index.php?installation

Usage

  • Start OpenVPN on the server (for example systemctl start openvpn@server)
  • Connect to the web application as an admin
  • Create an user
  • User get the configurations files via the web application (and put them in /etc/openvpn)
  • Users on GNU/Linux systems, run chmod +x /etc/openvpn/update-resolv.sh as root
  • User run OpenVPN (for example systemctl start openvpn@client)

Update

$ git pull origin master
# ./update.sh www_base_dir

Desinstall

It will remove all installed components (OpenVPN keys and configurations, the web application, iptables rules...).

# ./desinstall.sh www_base_dir

Use of