Go to file
2020-01-14 21:35:43 +01:00
.github Add github issue template 2017-08-16 22:52:50 +02:00
css added some cool new features 2018-05-29 17:54:02 +02:00
include „include/html/grids.php“ ändern 2020-01-14 21:35:43 +01:00
installation mergee ca.crt, ta.key into clien.ovpn (#128) 2019-03-01 09:09:33 +01:00
js added some cool new features 2018-05-29 17:54:02 +02:00
sql Fix init script 2017-07-26 16:40:52 +02:00
vendor add vendor 2019-08-07 23:05:45 +02:00
.bowerrc Big refresh 2015-07-09 21:19:54 +02:00
.gitignore asd 2020-01-14 20:12:01 +01:00
bower.json Update version 0.3.2 2017-02-07 20:36:20 +01:00
CHANGELOG.md Update version 0.3.2 2017-02-07 20:36:20 +01:00
desinstall.sh Hide root password at desinstallation step 2016-09-11 19:22:39 +02:00
index.php added some cool new features 2018-05-29 17:54:02 +02:00
install.sh Fix broken client.ovpn 2019-03-25 17:12:42 +01:00
LICENSE.md Update to AGPL licence 2017-02-24 18:25:24 +01:00
migration.php Fix migration script 2017-02-07 22:02:14 +01:00
README.md Fix Debian 9 prerequisite instructions (#144) 2019-05-24 08:36:37 +02:00
update.sh Fix database date: 0000-00-00 -> NULL 2017-02-05 17:07:56 +01:00

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
  • bower
  • unzip
  • wget
  • sed
  • curl

Debian 8 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

Debian 9 Stretch

In order to install npm, stretch-backports need to be added to your sources.list.

# apt-get install -t stretch-backports npm nodejs
# apt-get install openvpn apache2 php-mysql mysql-server php-zip php unzip git wget sed curl
# npm install -g bower

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

  • Setup OpenVPN and the web application:

    $ cd ~/my_coding_workspace
    $ git clone https://github.com/Chocobozzz/OpenVPN-Admin openvpn-admin
    $ cd openvpn-admin
    # ./install.sh /var/www www-data www-data
    
  • 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 /var/www

Desinstall

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

# ./desinstall.sh /var/www

Use of