Go to file
Knah Tsaeb 7fbdffa7d7 [add] count total per page 2015-07-21 16:02:24 +02:00
bin [fix] fuck me and my bad copy/paste 2015-07-13 09:59:01 +02:00
img/flag [add] print flag 2015-07-03 16:04:10 +02:00
page [add] count total per page 2015-07-21 16:02:24 +02:00
.gitignore [add] common config file 2015-05-29 15:21:27 +02:00
.htaccess [add] implement view in separate page 2015-06-18 10:11:20 +02:00
COPYING [add] implement view in separate page 2015-06-18 10:11:20 +02:00
INSTALL [chg] reorganize file 2015-05-27 12:25:08 +02:00
README update docs 2012-05-09 05:54:59 -05:00
bancount.css [chg] width of cell 2015-07-03 16:40:18 +02:00
index.php [add] top ten service 2015-07-21 15:56:51 +02:00

README

Fail2BanCount - by k6b - k6b@kylefberry.net


INSTALL:

Edit bancount and bancountmysql and put in the password you'll use for your
MySQL user below. Do the same with bancount.sh if you don't want to use the
perl version. You'll also want to make sure you copy the bash script instead. 

<<INSTALLER TO BE MADE>>

-Copy the Scripts:

cp ./bancountmysql /usr/local/bin/

cp ./bancount /usr/local/bin/

--OR

cp ./bancount.sh /usr/local/bin/bancount

-Prep MySQL:

mysql -e "CREATE DATABASE fail2bancount;"
mysql -e "GRANT SELECT, INSERT ON `fail2bancount`.* TO \
    'fail2bancount'@'localhost' IDENTIFIED BY PASSWORD '<YOUR PASSWORD HERE>';"
mysql fail2bancount < fail2bancount.sql

--

Fail2Ban Hax:

Edit the following in /etc/fail2ban/action.d/iptables*.conf, you'll need to do 
this for each one of the ban "actions" you're using:

actionban = iptables -I fail2ban-<name> 1 -s <ip> -j DROP
            /usr/local/bin/bancountmysql ban <ip>


actionunban = iptables -D fail2ban-<name> -s <ip> -j DROP
              /usr/local/bin/bancountmysql unban <ip>

There should be something similar if you are using something other than 
iptables. But don't ask me, learn how to use iptables.

--

Web Page:

First, edit the top of bancount.php and put the password you chose for your 
MySQL user, don't forget to edit the other settings if you chose something 
different. Then place bancount.css and bancount.php in a directory that's 
accessable to your web server. That should be it.

--

Please let me know if you run into any issues, if I've forgotten anything, if 
I've made any mistakes, or if you think I can do something better. If you hate 
it, let me know, I'll change it! It's likely I've overlooked things because it 
works well on my setup and it not quite ment for public consumption yet.


Thanks!

k6b (kyle@kylefberry.net)

05/2012