GithubHelp home page GithubHelp logo

chocobozzz / openvpn-admin Goto Github PK

View Code? Open in Web Editor NEW
946.0 946.0 363.0 584 KB

Install and administrate OpenVPN with a web interface (logs visualisations, users managing...)

License: GNU Affero General Public License v3.0

CSS 2.06% PHP 49.15% JavaScript 15.83% Shell 27.50% Hack 5.46%
administration openvpn openvpn-admin web

openvpn-admin's People

Contributors

bassauer-storms-media avatar chocobozzz avatar diranetafen avatar flintstone1409 avatar grische avatar hxpro avatar kantankerus avatar knah-tsaeb avatar lagman avatar moschlar avatar mullikine avatar nikaro avatar qingfenglee avatar rdch106 avatar sanspseudofix avatar tobiasnix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openvpn-admin's Issues

Only install UI

Are there any instructions on how to set up only the Web UI? As i already have a OpenVPN running.

Enchancement Adding Sort user by online etc

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

openvpn got AUTH_FAILED message

got ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
Any idea?Thanks.

Login error

After creating the admin account on the webinterface and afterwards trying to login with it, I get an login error. I deinstalled it several times and installed it again but I always get this messages when trying to login as Administrator.
vpn-admin_login_error

wget --show-progress on CentOS

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?

Installation sur ArchLinux

Bonjour,
Je viens d’installer OpenVPN-Admin sur mon Archlinux sans gros problème. Tout se passe bien. J’ai juste 2 petites remarques :

  • le port part défaut dans server.conf est 443… C’est un peu étrange car le port par défaut d’openvpn est 1194 et que le port 443 est déjà occupé par le serveur ssl (quand on installe openvpn et openvpn-admin sur la même machine par exemple)
  • l’autre remarque vient plus de l’OS, sous Archlinux, on n’a pas de nogroup mais on a le group nobody, ce n’est qu’une question de nommage, mais quitte à vérifier plein de chose dans le script install.sh, pourquoi ne pas vérifier ça aussi…

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)

User passwords sometimes change

User passwords change from time to time (Hash gets a prefix for all users and make the password invallid). Does the same for the admin but this password still works.
2016-08-30 07_23_18-192 168 0 33_index php_admin

LDAP or Active directory Connection

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.

Installation

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.

Downloading user connection files error.

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?

More people working on the project!

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

Provide a Dockerfile

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.

Unable to access shared folders

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

how to connect without password

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.

DB creation error during installation

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

Can't create users.

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.
img_20160915_163753
@Chocobozzz can you have a look at this. (Even tried it with a complete reinstall.)

Getting the last version of EasyRSA

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

configuration file downloaded is curropt

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>

Error reading multiple files by profil ca.crt ta.key

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

cant install

./install.sh base_dir:/var/www/html/ user:root group:nogroup
cant get it working

How to use on windows?

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?

Unwanted disconnection

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?

Add iOS to OS list?

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

Cannot access web-ui

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

Essai N°1

Bonjour,

C'est juste pour vérifier si l'envoi d'issue GitHub fonctionne bien.

Merci.

Support use of Mysql on different server

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

Installation : bower invalid-meta

English explanations

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.

I need some help please?

./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

Documentation for debian9 Stretch

Hi,

Here's some setup instructions for debian9:

Install OpenVPN-Admin on Debian 9 Stretch

Install nodejs and npm

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

Install OpenVPN-Admin

$ 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

about the last step to create a admin

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!

'scripts/login.sh': No such file or directory

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

Error add user

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"

http://savepic.ru/14896736.png

Timezone change on WebUI

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

no internet connection

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.

Install alongside existing OpenVPN Server

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.