chocobozzz / openvpn-admin Goto Github PK
View Code? Open in Web Editor NEWInstall and administrate OpenVPN with a web interface (logs visualisations, users managing...)
License: GNU Affero General Public License v3.0
Install and administrate OpenVPN with a web interface (logs visualisations, users managing...)
License: GNU Affero General Public License v3.0
after creating the user when i loging i cant download the config. http error 500
It would be great to support Docker as deployment strategy. This way people could test this tool pretty fast and check if it fits their needs.
Has someony already build a dockerfile for this? I'm not that experienced in it but would be willing to contribute as far as i can.
When trying to create users with the new 0.3.0 version i always get the the following popup error:error.
Digging in my apache logs I get these errors.
@Chocobozzz can you have a look at this. (Even tried it with a complete reinstall.)
I installed but when I download the configuration file its corrupt and is like this:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>OpenVPN-Admin</title>
<link rel="stylesheet" href="vendor/bootstrap/dist/css/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="vendor/x-editable/dist/bootstrap3-editable/css/bootstrap-editable.css" type="text/css" />
<link rel="stylesheet" href="vendor/bootstrap-table/dist/bootstrap-table.min.css" type="text/css" />
<link rel="stylesheet" href="vendor/bootstrap-datepicker/dist/css/bootstrap-datepicker3.css" type="text/css" />
<link rel="stylesheet" href="css/index.css" type="text/css" />
<link rel="icon" type="image/png" href="css/icon.png">
</head>
<body class='container-fluid'>
<div class="col-md-6 col-md-offset-3">
<nav class="navbar navbar-default">
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="index.php">Configurations</a></li>
<li ><a href="index.php?admin">Administrator</a></li>
</ul>
</div>
</nav>
</div>
<div class="row">
<div class="col-md-4 col-md-offset-4">
<form id="configuration_form" method="POST" class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Get the configuration files</h3>
</div>
<div class="panel-body">
<div class="form-group">
<label for="configuration_username">Username</label>
<input type="text" id="configuration_username" name="configuration_username" class="form-control" autofocus/>
</div>
<div class="form-group">
<label for="configuration_pass">Password</label>
<input type="password" id="configuration_pass" name="configuration_pass" class="form-control" />
</div>
<div class="form-group">
<label for="configuration_os">OS</label>
<select name="configuration_os" id="configuration_os" class="form-control">
<option value="gnu_linux">GNU/Linux</option>
<option value="windows">Windows</option>
</select>
</div>
<input id="configuration_get" name="configuration_get" type="submit" value="Get configuration files" class="btn btn-default" />
</div>
</form>
</div>
</div>
</body>
</html>
can you added more server in your code , server-udp.conf port 1194 or something?
Hello there, everything seems to be okay at least for me except the user files.
When i am trying to download the user files for the vpn server i am getting one .zip file and it gives me an error that the file is empty..
Can i do something to fix it?
I know this is maybe a bit too far but is it possible to make an active directory connection, or at least LDAP. For us system admins this will be great.
Bonjour,
C'est juste pour vérifier si l'envoi d'issue GitHub fonctionne bien.
Merci.
Bonjour,
Je viens d’installer OpenVPN-Admin sur mon Archlinux sans gros problème. Tout se passe bien. J’ai juste 2 petites remarques :
Dans tous les cas, ça faisait un moment que je voulais installer et configurer OpenVpn sur mon serveur et après plusieurs tentatives infructueuses, j’avais laissé tomber… Mais là, en 10 minutes, tout fonctionne, chapeau !
Au passage, la configuration GNU/Linux fonctionne aussi sous Android (testé avec l’application "OpenVPN for Android" https://f-droid.org/repository/browse/?fdfilter=OpenVPN+for+Android&fdid=de.blinkt.openvpn)
All configuration file downloads are incomplete and failing after a successful installation on Debian Jessie. Any idea why that might be, or where I can look to see what might be up?
Export usernames/passwords of all users by admin, to import in another OpenVPN-Admin instance.
It is currently not possible to install you OpenVPN-Admin app if the Mysql Server is located on a remote server. Could you add support for that ?
See the comment on line 85 of the install script: # TODO MySQL port & host ?
Thanks
There are more people working on the project, maybe it is adviced to start using a stylesheet or something.
Maybe it is also advices to use Hipchat so collaboration is much easier
./install.sh base_dir:/var/www/html/ user:root group:nogroup
cant get it working
Hi again,
The log section in the WUI shows the login time for a user but not the time the user logs off, this is only shown when the user (or another) logs in again.
This happens on debian 8 and 9.
I'm using a linux client. Using the downloaded configuration file and enabling it as a service (using it from /etc/openvpn on startup) it asks for the password during the startup process.
Is there a way to not ask for the password?, It cannot be used as a background service if it asks for it.
Is it possible to get a bulk export of all users by an admin.
Hello,
What do you think about getting the latest version of EasyRSA by getting the version number from GitHUb like this:
LATEST_VERSION=$(
curl -s https://api.github.com/repos/OpenVPN/easy-rsa/releases/latest | \
grep 'tag_name' | \
awk '{ print $2 }' | \
sed 's/[,|"|v]//g'
)
Since they provide a sig file we can also check the file integrity with its signature, but for the moment i didn't found where/which is the public key with which check the signature…
I used all of this in my script to upgrade nextcloud/owncloud, you can see it here: https://git.karolak.fr/snippets/16
Je viens de faire l'installation sous debian jessie, sur une vps d'ovh (noyau pas vraiment à jour, donc...).
Une seule erreur répertoriée lors de l'installation :
bower invalid-meta The "main" field cannot contain minified files
Cela n'a rien bloqué ; par contre, une fois l'installation finie, il manque le css dans l'application. Je devrais pouvoir trouver ça pour ma propre installation (mais j'accepte avec plaisir qu'on me pointe ce qu'il faut chercher !) mais il y a peut-être une erreur de syntaxe dans un des fichier d'installation ? C'est mineur mais si ça peut aider à améliorer...
Merci pour cet outil, c'est une super idée.
./install.sh www_base_dir web_user web_group
./install.sh /var/www/html/ httpd web_group
what is web_group and i hope web_user is correct aswell
After being unable to change the time on webUI after changing the system and hardware clocks to my timezone, It later struck on me to restart the syslog server. I just decided to restart the GCE instance I am hosting this on. It cleared things up. I've marked the issue as closed. Please feel free to delete this if it's junk.
Sorry for the inconvenience.
-Abhinav
Install on Ubuntu 16.04 with NGINX + php-fpm
When i creaate user, i take error:
2017/07/19 11:25:45 [error] 9495#9495: *99 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'openvpn-admin.user' doesn't exist in /var/www/html/openvpn-admin/include/grids.php:127
Stack trace:
#0 /var/www/html/openvpn-admin/include/grids.php(127): PDOStatement->execute(Array)
#1 {main}
thrown in /var/www/html/openvpn-admin/include/grids.php on line 127" while reading response header from upstream, client: 10.1.1.156, server: _, request: "POST /openvpn-admin/include/grids.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "10.1.1.168", referrer: "http://10.1.1.168/openvpn-admin/index.php?admin"
after succesfully installation when i tried to download the configuration files it says that file is corrupt..
Hi,
Here's some setup instructions for debian9:
Due to security issues (see https://www.debian.org/releases/stretch/amd64/release-notes/ch-information.en.html#libv8) node.js should not be installed
from the debian 9 repository. Instead, the following instructions (found here: http://linuxbsdos.com/2017/06/26/how-to-install-node-js-lts-on-debian-9-stretch/)
will help you set up node.js 6.x LTS (long term support) which also provide npm.
Install curl:
$ apt-get install curl
Setup the required repositories:
$ curl -sL https://deb.nodesource.com/setup_6.x | sudo bash -
Install node.js and npm:
$ apt-get install nodejs
$ apt-get install openvpn apache2 php7.0 php7.0-mysql php7.0-zip mariadb-server-10.1 unzip git wget sed
$ npm install -g bower
$ cd ~/my_coding_workspace
$ git clone https://github.com/Chocobozzz/OpenVPN-Admin openvpn-admin
$ cd openvpn-admin
$ ./install.sh www_base_dir web_user web_group
make sure to run the following command so that the openvpn systemctl script is updated;
systemctl daemon-reload
Hello I installed the script yesterday on my VPS Apache installation and openvpn all fresh. But I download the configuration file of the first user and I import it into OpenVPN Connect on Android I have this error message. What can this be? Knowing that I have configured Apache to use HTTPS forcibly and that I generate certificates with let's encrypt
hey ,
thank you for sharing ,
is it possible to read user packet ?
Hello, in addition to the problem of access to shared files, here I notice on two pc remote one under Windows Vista and the other under Seven using each openvpn gui v.2.4.0 unwanted disconnection, and those several times By days, in the logs of the clients no error, I have not looked at the server.
Have you ever had such a disconnection problem?
In CentOS 7 repository is wget in version 1.14. This version has no option --show-progress.
You useed it at row 122 of install.sh, can you omit it?
Hi,
I discovered that using a recent Ubuntu 16.04 with mysql 5.7 the installation script fails to create log and user table.
This is due to the usage of the default value in the log table for the field log_end_time.
To make it work I changed import.sql for this field to be:
log_end_time
timestamp NOT NULL DEFAULT '1970-01-01 00:00:01',
Regards
There is a zip file that is downloaded, and it does not extract on windows, and makes multiple copies of itself on my MacBook. How do you use this on windows?
Also, is there a way to modify this program to let me download ovpn files for the users instead of zip files?
Hi,
First of all, thanks for a great product.
after a fresh install following your installation guide I noticed VPN was not running and no log file was created.
I ran openvpn manually like this:
openvpn --config /etc/openvpn/server.conf
which resulted in a log file (but no running openvpn server)
the log showed this error:
Options error: --auth-user-pass-verify script fails with 'scripts/login.sh': No such file or directory
Options error: Please correct this error.
I tried a few things to correct it, in the end the most straight-forward fix is as follows;
In the file /etc/default/openvpn, change the line
OPTARGS=""
to
OPTARGS="--chroot /etc/openvpn"
Not sure if this could be called a bug, but maybe this can be added in the setup script?
Kind Regards,
Taco
Ajouter du bootstrap pour rendre le tout plus joli
Hello, I did not have time yesterday to say thank you for the help given to the previous problem (closed topic). But I am faced with another problem, the application connects well to the vpn, but there seems to be no internet connection, I looked on various forums, I explore all the tracks, without success for the moment . I am French, I hope my English is not too bad. Have a good day and a happy new year at all.
Hi,
Please can someone provide me with a clear description on how to install OpenVPN-Admin
Like a step by step process on all requirements Apache etc
the process in README is not very clear to me as i'm new to using any form of linux and also you dont state that the user must be root or must create new user would be cool if you can note this down below please
like how would you do this
Setup the web server (Apache, NGinx...) to serve the web application.
Are there any instructions on how to set up only the Web UI? As i already have a OpenVPN running.
After running the installer, and accessing /index.php?installation
, i get an Internal server error
And from apache logs:
[Mon Apr 10 09:04:44.088968 2017] [:error] [pid 1328] [client :34120] PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[28000] [1045] Access denied for user 'www-data'@'localhost' (using password: NO)' in /var/www/html/include/connect.php:5\nStack trace:\n#0 /var/www/html/include/connect.php(5): PDO->__construct('mysql:host=loca...', '', '', Array)\n#1 /var/www/html/index.php(5): require('/var/www/html/i...')\n#2 {main}\n thrown in /var/www/html/include/connect.php on line 5
got ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
Any idea?Thanks.
I have just installed the script on a server, everything is ok, I have internet on my pc, one of my pc is under Vista (work) and seven at home.
The question is that I can not access my shared folder, I enter the explorer \ 10.8.0.6 I have nothing, but under seven the network profile is public network.
Is there a setting for iptables?
Thank you
good night
First of all, thank you for this nice script
Please add sort user order by user_online and sort user by user_end_date button/link
And truncate displayed password cause its taking a lot of space and making the text to small when using mobile phone or tablet
No users can be created via the web gui image attached http://imgur.com/a/ZHKjo
after I visit /index.php?installation there is nothing in the admin table,i really type a accout and a password in the blank,when i visit /index.php?admin and login the web tell me login error.
thanks for your answer!
Hello
Awesome project :)
How can i add iOS as an operating system, or perhaps add this to the project? I think setenv CLIENT_CERT 0 may be required for ios.
Thanks
On ArchLinux for example, there is the group 'nobody' and not 'nogroup'.
I would like to install over the top of an existing OpenVPN config (and not start again from scratch) this will be very useful for logs etc moving forward.
looking at the install.sh it appears this could be accomplished by removing lines 88-199 in install.sh. I would hate to miss something and destroy my current config so hoping you can clarify any other reason not to install this post installing OpenVPN given you put this all together?
Could either have 2 install files or the install file dynamically detects a current install (I would go the former to prevent people accidentally selecting to overwrite an installation)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.