Skip to content
Python WebUI to manage Nginx white-listed IP addresses
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
web-alohomora
LICENSE
README.md
docker-compose.yml
preview.png

README.md

Alohomora-Docker

Alohomora is a python WebUI designed to manage Nginx white-listed IP addresses.

The web interface allows you to add and remove IP addresses from a list. These IP addresses are stored in a SQLite database and associated with a label and an expiration date. As soon as an IP address is added, deleted, or expired, an allow.conf file is generated. A watcher automatically detects any change in the allow.conf file and copies it in the Nginx configuration directory before reloading Nginx.

Web interface of Alohomora

This project is based on Blusky's work (https://github.com/TheBlusky/alohomora).

Installation

You have to install docker and docker-compose (https://docs.docker.com/compose/install/). Remember to set your own token as an environment variable ALOHOMORA_TOKEN in docker-compose.yml!

$ git clone https://github.com/vonKrafft/Alohomora-Docker
$ cd Alohomora-Docker
$ docker-compose up -d

You will need to install inotify to detect changes to the allow.conf file. Make sure the script is executable and run it as a daemon (you can redirect stdout to a log file). Remember to change the NGINX_VHOST_DIR and ALOHOMORA_DIR values to fit your directory organization!

$ sudo apt install inotify-tools
$ chmod +x web-alohomora/alohomora-watcher.sh 
$ setsid ./alohomora_watcher.sh >alohomora.logs 2>&1 < /dev/null &

Dependencies

Docker

Web interface

License

This source code may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.

You can’t perform that action at this time.