Micro Fail 2 Ban
================
Since the original fail2ban.org requires Python, I considered it to be quite
bloaty, especially with use on an embedded device in mind. Micro Fail 2 Ban aims
at fixing this.
Building the Source
-------------------
In most cases, a simple 'make' should do the trick. In case the outcome is not
as expected, you may want to have a look at the top-level Makefile for details.
Installing the Binaries
-----------------------
Just call 'make install'. In case installation to a specific location is
desired, the Makefile understands the well-known environment variable DESTDIR.
Using the Force
---------------
The default 'mf2b.conf' provided with these sources shall serve as a basis for
the following instructions. It uses a shell script shipped with this
installation for the ban/unban actions, which eases handling of iptables calls.
For it to work, you need a dedicated user-defined chain in iptables as well as
ip6tables. These will be used by 'iptables.sh' to insert drop rules into (or
delete from when the timeout has passed). By default, the script assumes a
custom chain named 'mf2b' in the 'filter' table, and the 'INPUT' chain has to
link to it for the rules to become effective. Here's a sample setup:
# iptables -N mf2b
# ip6tables -N mf2b
# iptables -I INPUT -j mf2b
# ip6tables -I INPUT -j mf2b
Once this is done, running 'mf2b' daemon is all that's left to do:
# mf2b
By default, 'mf2b' will log to syslog so this is definitely worth checking in
case it does unexpected things.