Administrate its OpenVPN with a web interface (logs visualisations, users managing...) and a SQL database.
# 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
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
# 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
Only tested on Debian Jessie. Feel free to open issues.
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
systemctl start openvpn@server
)chmod +x /etc/openvpn/update-resolv.sh
as rootsystemctl start openvpn@client
)$ git pull origin master
# ./update.sh /var/www
It will remove all installed components (OpenVPN keys and configurations, the web application, iptables rules...).
# ./desinstall.sh /var/www