- Include all JavaScript files from http://leafletjs.com/ and https://jquery.com/ to the file system structure of fail2map
- Change from http://www.telize.com (the public API will permanently shut down) to http://ip-api.com
- Fix some problems with UTF-8 inside the fail2map.py python script
- Shell/Bash script for MERGE various ''places.geojson'' files to one - (
fail2map-merge.sh
)
Fail2map is a map generator for fail2ban. It displays banned IP on a world map. Adding IP is done automagically through a fail2ban action.
Fail2map is based on backpack by Maxime Hadjinlian.
Try the example.
-
Place fail2map in the desired path of your web server
git clone https://github.com/mvonthron/fail2map ~/public_html/fail2map
-
Edit
fail2map-action.conf
with the correct path for fail2map.pyfail2map-action.conf:20 fail2map = cd /home/<USER>/public_html/fail2map && python fail2map.py
-
Move/copy/link
fail2map-action.conf
to fail2ban actions folder (usually/etc/fail2ban/action.d/
) -
Add the action to your
jail.conf
orjail.local
# The simplest action to take: ban only action_ = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"] fail2map-action
-
(Optional) Change the tile provider in js/maps.js line 45:
baseLayer = L.tileLayer.provider('Thunderforest.Landscape', ... ^= select any provider listed at http://leaflet-extras.github.io/leaflet-providers/preview/
- OpenStreetMap tiles providers list by https://github.com/leaflet-extras/leaflet-providers
- Map API from leaflet
- IP geolocation is provided by IP-API.com Geolocation API. It's free! If you want to achieve high precision, you may want a paid account at maxmind.com and change
GEOIP_API
infail2map.py
.
2015, Manuel Vonthron [email protected]
2016, Klaus Tachtler [email protected]