{ "info": { "author": "Marcus Furlong", "author_email": "furlongm@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application" ], "description": "# openvpn-monitor\n\n\n## Summary\n\nopenvpn-monitor is a simple python program to generate html that displays the\nstatus of an OpenVPN server, including all current connections. It uses the\nOpenVPN management console. It typically runs on the same host as the OpenVPN\nserver, however it does not necessarily need to.\n\n[![](https://raw.githubusercontent.com/furlongm/openvpn-monitor/gh-pages/screenshots/openvpn-monitor.png)](https://raw.githubusercontent.com/furlongm/openvpn-monitor/gh-pages/screenshots/openvpn-monitor.png)\n\n\n## Source\n\nThe current source code is available on github:\n\nhttps://github.com/furlongm/openvpn-monitor\n\n\n## Install Options\n - [virtualenv + pip + gunicorn](#virtualenv--pip--gunicorn)\n - [apache](#apache)\n - [docker](#docker)\n - [nginx + uwsgi](#nginx--uwsgi)\n - [deb/rpm](#deb--rpm)\n\nN.B. all CentOS/RHEL instructions assume the EPEL repository has been installed:\n\n```shell\nyum install -y epel-release\n\n```\n\n### virtualenv + pip + gunicorn\n\n```shell\n# apt-get install python-virtualenv geoip-database-extra geoipupdate # (debian/ubuntu)\n# yum install python-virtualenv GeoIP-update geolite2-city python2-geoip2 # (centos/rhel)\nmkdir /srv/openvpn-monitor\ncd /srv/openvpn-monitor\nvirtualenv .\n. bin/activate\npip install --upgrade pip\npip install openvpn-monitor gunicorn\ngunicorn openvpn-monitor -b 0.0.0.0:80\n```\n\nSee [configuration](#configuration) for details on configuring openvpn-monitor.\n\n\n### apache\n\n#### Install dependencies and configure apache\n\n##### Debian / Ubuntu\n\n```shell\napt-get -y install git wget apache2 libapache2-mod-wsgi python2-geoip2 python-ipaddr python-humanize python-bottle python-semantic-version geoip-database-extra geoipupdate\necho \"WSGIScriptAlias /openvpn-monitor /var/www/html/openvpn-monitor/openvpn-monitor.py\" > /etc/apache2/conf-available/openvpn-monitor.conf\na2enconf openvpn-monitor\nsystemctl restart apache2\n```\n\n##### CentOS / RHEL\n\n```shell\nyum install -y git wget httpd mod_wsgi python2-geoip2 python-ipaddr python-humanize python-bottle python-semantic_version geolite2-city GeoIP-update\necho \"WSGIScriptAlias /openvpn-monitor /var/www/html/openvpn-monitor/openvpn-monitor.py\" > /etc/httpd/conf.d/openvpn-monitor.conf\nsystemctl restart httpd\n```\n\n#### Checkout openvpn-monitor\n\n```shell\ncd /var/www/html\ngit clone https://github.com/furlongm/openvpn-monitor.git\n```\n\nSee [configuration](#configuration) for details on configuring openvpn-monitor.\n\n\n### docker\n\n```shell\ndocker run -p 80:80 ruimarinho/openvpn-monitor\n```\n\nRead the [docker installation instructions](https://github.com/ruimarinho/docker-openvpn-monitor#usage)\nfor details on how to generate a dynamic configuration using only environment\nvariables.\n\n\n### nginx + uwsgi\n\n#### Install dependencies\n\n```shell\n# apt-get install gcc libgeoip-dev python-virtualenv python-dev geoip-database-extra nginx uwsgi uwsgi-plugin-python geoipupdate # (debian/ubuntu)\n# yum install gcc geoip-devel python-virtualenv python-devel GeoIP-data GeoIP-update nginx uwsgi uwsgi-plugin-python geolite2-city python2-geoip2 # (centos/rhel)\n```\n\n#### Checkout openvpn-monitor\n\n```shell\ncd /srv\ngit clone https://github.com/furlongm/openvpn-monitor.git\ncd openvpn-monitor\nvirtualenv .\n. bin/activate\npip install -r requirements.txt\n```\n\n#### uWSGI app config\n\nCreate a uWSGI config in `/etc/uwsgi/apps-available/openvpn-monitor.ini`\n\n```\n[uwsgi]\nbase = /srv\nproject = openvpn-monitor\nlogto = /var/log/uwsgi/app/%(project).log\nplugins = python\nchdir = %(base)/%(project)\nvirtualenv = %(chdir)\nmodule = openvpn-monitor:application\nmanage-script-name = true\nmount=/openvpn-monitor=openvpn-monitor.py\n```\n\n#### Nginx site config\n\nCreate an Nginx config in `/etc/nginx/sites-available/openvpn-monitor`\n\n```\nserver {\n listen 80;\n location /openvpn-monitor/ {\n uwsgi_pass unix:///run/uwsgi/app/openvpn-monitor/socket;\n include uwsgi_params;\n }\n}\n```\n\n#### Enable uWSGI app and Nginx site, and restart services\n\n```shell\nln -s /etc/uwsgi/apps-available/openvpn-monitor.ini /etc/uwsgi/apps-enabled/\nservice uwsgi restart\nln -s /etc/nginx/sites-available/openvpn-monitor /etc/nginx/sites-enabled/\nservice nginx reload\n```\n\nSee [configuration](#configuration) for details on configuring openvpn-monitor.\n\n\n\n### deb / rpm\n\n```shell\nTBD\n```\n\n## Configuration\n\n### Configure OpenVPN\n\nAdd the following line to your OpenVPN server configuration to run the\nmanagement console on 127.0.0.1 port 5555:\n\n```\nmanagement 127.0.0.1 5555\n```\n\nRefer to the OpenVPN documentation for further information on how to secure\naccess to the management interface.\n\n\n### Configure openvpn-monitor\n\nCopy the example configuration file `openvpn-monitor.conf.example` to the same\ndirectory as openvpn-monitor.py.\n\n```shell\ncp openvpn-monitor.conf.example openvpn-monitor.conf\n\n```\n\nIn this file you can set site name, add a logo, set the default map location\n(latitude and longitude). If not set, the default location is New York, USA.\n\nOnce configured, navigate to `http://myipaddress/openvpn-monitor/`\n\nNote the trailing slash, the images may not appear without it.\n\n\n### Debugging\n\nopenvpn-monitor can be run from the command line in order to test if the html\ngenerates correctly:\n\n```shell\ncd /var/www/html/openvpn-monitor\npython openvpn-monitor.py\n```\n\nFurther debugging can be enabled by specifying the `--debug` flag:\n\n```shell\ncd /var/www/html/openvpn-monitor\npython openvpn-monitor.py -d\n```\n\n\n## License\n\nopenvpn-monitor is licensed under the GPLv3, a copy of which can be found in\nthe COPYING file.\n\n\n## Acknowledgements\n\nFlags are created by Matthias Slovig (flags@slovig.de) and are licensed under\nCreative Commons License Deed Attribution-ShareAlike 3.0 Unported\n(CC BY-SA 3.0). See http://flags.blogpotato.de/ for more details.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://openvpn-monitor.openbytes.ie", "keywords": "web openvpn monitor", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "openvpn-monitor", "package_url": "https://pypi.org/project/openvpn-monitor/", "platform": "", "project_url": "https://pypi.org/project/openvpn-monitor/", "project_urls": { "Homepage": "http://openvpn-monitor.openbytes.ie" }, "release_url": "https://pypi.org/project/openvpn-monitor/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "A simple web based openvpn monitor", "version": "1.0.0" }, "last_serial": 4358656, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "4c59a731823389e4c8a62fd89a3609d3", "sha256": "2ec46d8a73cab05b1d93284e2db66d83633cc7b7ed2e30eb103636b6a20de56f" }, "downloads": -1, "filename": "openvpn-monitor-1.0.0.tar.gz", "has_sig": false, "md5_digest": "4c59a731823389e4c8a62fd89a3609d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 210616, "upload_time": "2018-10-10T04:42:23", "url": "https://files.pythonhosted.org/packages/42/25/0e8570834925a8510f7383085d81491e2b7cca58daa07713cd5f685986f3/openvpn-monitor-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4c59a731823389e4c8a62fd89a3609d3", "sha256": "2ec46d8a73cab05b1d93284e2db66d83633cc7b7ed2e30eb103636b6a20de56f" }, "downloads": -1, "filename": "openvpn-monitor-1.0.0.tar.gz", "has_sig": false, "md5_digest": "4c59a731823389e4c8a62fd89a3609d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 210616, "upload_time": "2018-10-10T04:42:23", "url": "https://files.pythonhosted.org/packages/42/25/0e8570834925a8510f7383085d81491e2b7cca58daa07713cd5f685986f3/openvpn-monitor-1.0.0.tar.gz" } ] }