Monthly Archives: March 2017

a great way to get rid of some hackers from our web sites

installation on Debian 8

Step 1: Install

Method One
the default install method

First thing to do is find out what version of fail2ban would install using the default install method:

# sudo apt search fail2ban

         Sorting… Done
         Full Text Search… Done
         fail2ban/stable 0.8.13-1 all
         ban hosts that cause multiple authentication errors

The default install method goes like this:

# su
# apt-get update
# apt-get install fail2ban
# cd /etc/fail2ban/
# cp jail.conf  jail.local ( as jail.local will overrule jail.conf )

# vi jail.local  
( and enable ssh in the section headed [ssh],  setting “enabled = true” )

# service fail2ban restart

Run “iptables -S” 
to make sure that Fail2Ban has added itself successfully to the ip rules.

That is: for version 0.8.13, there would be an entry in the iptables of 
“-N fail2ban-ssh” when [ssh] is enabled 
in the configuration file “/etc/fail2ban/jail.local”.

If you want the multi-line functionality and other stuff from a later version of fail2ban, I suggest method two below ….. in continue reading the rest of the setup link following.

Continue reading

© 2017, James Harry Burton. All rights reserved.