https://github.com/strangelookingnerd/fail2ban-map
A map generator for fail2ban.
https://github.com/strangelookingnerd/fail2ban-map
fail2ban leaflet map
Last synced: 4 months ago
JSON representation
A map generator for fail2ban.
- Host: GitHub
- URL: https://github.com/strangelookingnerd/fail2ban-map
- Owner: strangelookingnerd
- License: mit
- Created: 2025-03-13T16:33:19.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-06-10T12:02:07.000Z (4 months ago)
- Last Synced: 2025-06-10T12:34:05.016Z (4 months ago)
- Topics: fail2ban, leaflet, map
- Language: JavaScript
- Homepage: https://strangelookingnerd.github.io/fail2ban-map/
- Size: 48.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fail2ban-map
[](https://github.com/strangelookingnerd/fail2ban-map/actions/workflows/build.yml)
```
_______ _______ ___ ___ _______ _______ _______ __ _ __ __ _______ _______
| || _ || || | | || _ || _ || | | | | |_| || _ || |
| ___|| |_| || || | |____ || |_| || |_| || |_| | ____ | || |_| || _ |
| |___ | || || | ____| || || || ||____|| || || |_| |
| ___|| || || |___ | ______|| _ | | || _ | | || || ___|
| | | _ || || || |_____ | |_| || _ || | | | | ||_|| || _ || |
|___| |__| |__||___||_______||_______||_______||__| |__||_| |__| |_| |_||__| |__||___|
```## What is this?

fail2ban-map is a map generator for [fail2ban](http://www.fail2ban.org).
It displays banned IP on a world map. Adding IP is done through a fail2ban *action* included in this repository.Check out the [demo](https://strangelookingnerd.github.io/fail2ban-map/).
fail2ban-map is a re-write of [fail2map](https://github.com/tachtler/fail2map) by Manuel Vonthron and Klaus Tachtler.
## Installation
* Clone fail2ban-map to the desired location
```bash
git clone https://github.com/strangelookingnerd/fail2ban-map /home/pi
```
* Install dependencies```bash
cd /home/pi/fail2ban-map
npm install
pip install -r requirements.txt
```* Edit `script/fail2ban-map-action.conf` with the correct path to fail2ban_map.py
```bash
nano /home/pi/fail2ban-map/script/fail2ban-map-action.conf
``````bash
fail2ban-map = cd /home/pi/fail2ban-map/script && python fail2ban_map.py
```* Create a symlink to `script/fail2ban-map-action.conf` in the fail2ban actions folder
```bash
ln -s /home/pi/fail2ban-map/script/fail2ban-map-action.conf /etc/fail2ban/action.d/fail2ban-map-action.conf
```
* Add the action to your `jail.conf` or `jail.local````bash
# The simplest action to take: ban only
action_ = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
fail2ban-map-action
```* (Optional) Change the tile provider in `public/fail2ban-map.js`
```javascript
// list of tile providers can be seen here: https://leaflet-extras.github.io/leaflet-providers/preview/
L.tileLayer.provider("CartoDB.DarkMatterNoLabels").addTo(map);
```