GithubHelp home page GithubHelp logo

dedayoa / openvpn-monitor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from furlongm/openvpn-monitor

0.0 1.0 0.0 1.01 MB

openvpn-monitor is a web based OpenVPN monitor, that shows current connection information, such as users, location and data transferred.

Home Page: http://openvpn-monitor.openbytes.ie

License: GNU General Public License v3.0

Python 100.00%

openvpn-monitor's Introduction

OpenVPN-Monitor

Summary

OpenVPN-Monitor is a simple python program to generate html that displays the status of an OpenVPN server, including all current connections. It uses the OpenVPN management console. It typically runs on the same host as the OpenVPN server, however it does not necessarily need to.

Source

The current source code is available on github:

https://github.com/furlongm/openvpn-monitor

Installation with virtualenv + pip + gunicorn

N.B libgeoip-dev should also be installed using yum/apt-get

mkdir /srv/openvpn-monitor
cd /srv/openvpn-monitor
virtualenv .
. bin/activate
pip install openvpn-monitor gunicorn
gunicorn openvpn-monitor -b 0.0.0.0:80

Installation with Docker

docker run -p 80:80 ruimarinho/openvpn-monitor

Read the docker installation instructions for details on how to generate a dynamic configuration using only environment variables.

Standard Installation

Install dependencies and configure apache

Debian / Ubuntu

apt-get -y install python-geoip python-ipaddr python-humanize python-bottle python-semantic-version apache2 libapache2-mod-wsgi git wget
echo "WSGIScriptAlias /openvpn-monitor /var/www/html/openvpn-monitor/openvpn-monitor.py" > /etc/apache2/conf-available/openvpn-monitor.conf
a2enconf openvpn-monitor
systemctl restart apache2

CentOS

yum install -y epel-release
yum install -y python-GeoIP python-ipaddr python-humanize python-bottle python-semantic_version httpd mod_wsgi git wget
echo "WSGIScriptAlias /openvpn-monitor /var/www/html/openvpn-monitor/openvpn-monitor.py" > /etc/httpd/conf.d/openvpn-monitor.conf
systemctl restart httpd

Checkout OpenVPN-Monitor

cd /var/www/html
git clone https://github.com/furlongm/openvpn-monitor.git

Configure OpenVPN

Add the following line to your OpenVPN server configuration to run the management console on 127.0.0.1 port 5555:

management 127.0.0.1 5555

Refer to the OpenVPN documentation for further information on how to secure access to the management interface.

Download the GeoLite City database

cd /usr/share/GeoIP/
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
gunzip GeoLiteCity.dat.gz
mv GeoLiteCity.dat GeoIPCity.dat

Configure OpenVPN-Monitor

The example configuration file /var/www/html/openvpn-monitor/openvpn-monitor.conf should give some indication of how to set site name, add a logo, etc. You can also set a default location (latitude and longitude) for the embedded maps. If not set, the default location is Melbourne, Australia.

Edit /var/www/html/openvpn-monitor/openvpn-monitor.conf to match your site.

You should now be able to navigate to http://myipaddress/openvpn-monitor

Debugging

OpenVPN-Monitor can be run from the command line in order to test if the html generates correctly:

cd /var/www/html/openvpn-monitor
python openvpn-monitor.py

Further debugging can be enabled by specifying the --debug flag:

cd /var/www/html/openvpn-monitor
python openvpn-monitor.py -d

License

OpenVPN-Monitor is licensed under the GPLv3, a copy of which can be found in the COPYING file.

Acknowledgements

Flags are created by Matthias Slovig ([email protected]) and are licensed under Creative Commons License Deed Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0). See http://flags.blogpotato.de/ for more details.

openvpn-monitor's People

Contributors

furlongm avatar quantifiedcode-bot avatar meisterschueler avatar ruimarinho avatar tobiasnix avatar hexedpackets avatar pyup-bot avatar scomoletti avatar

Watchers

James Cloos avatar

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.