How To install BFD (Brute Force Detection)

Descripton: "BFD is a modular shell script for parsing applicable logs and checking for authentication failures. There is not much complexity or detail to BFD yet and likewise it is very straight-forward in its installation, configuration and usage. The reason behind BFD is very simple; the fact there is little to no authentication and brute force auditing programs in the linux community that work in conjunction with a firewall or real-time facility to place bans."
( http://www.rfxnetworks.com/bfd.php )

Note that you must have APF Firewall installed before installing BFD, it works with APF and requires some APF files to operate. You can read How TO install APF Firewall post.

Login to your server as root,

On a folder where you store your files (eg. /root/dwl)
# wget http://www.rfxnetworks.com/downloads/bfd-current.tar.gz
# tar -xvzf bfd-current.tar.gz
# cd bfd-x.yz
# ./install.sh

You will receive the next message:
.: BFD installed
Install path: /usr/local/bfd
Config path: /usr/local/bfd/conf.bfd
Executable path: /usr/local/sbin/bfd

Edit the configuration file:
# nano /usr/local/bfd/conf.bfd

Enable brute force hack attempt alerts:
1. Find: ALERT_USR="0" Change it to: ALERT_USR="1"
2. Find: EMAIL_USR="root" Change it to: EMAIL_USR=email@yourserver.com
Save and Exit

If you have an fix IP add your IP to "trusted IPs"
# nano /usr/local/bfd/ignore.hosts
Add your IPs, save an exit.

You can run BFD now:
# /usr/local/sbin/bfd -s

You can also customize applicatoins brute force configuration, check /usr/local/bfd where you can find kinds of pre-made rules for popular services such as Apache.

0 Comments: