Server Administration & Management

How to install BFD (Brute Force Detection)

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. BFD is available at: http://www.rfxnetworks.com/bfd.php This guide will show you how to install and configure BFD to protect your system from brute force hack attempts.

:- You MUST have APF Firewall Installed before installing BFD, it works with APF and requires some APF files to operate.
:- Root SSH access to your server

# cd /usr/local/src/

# wget http://www.rfxnetworks.com/downloads/bfd-current.tar.gz

# tar -xvzf bfd-current.tar.gz

# cd bfd-*

# ./install.sh [Run the install file]

You will receive a message saying it has been installed
.: BFD installed
Install path:    /usr/local/bfd
Config path:     /usr/local/bfd/conf.bfd
Executable path: /usr/local/sbin/bfd

Edit the configuration file & Enable brute force hack attempt alerts

# vi /usr/local/bfd/conf.bfd

Find: EMAIL_USR=”root” CHANGE TO: EMAIL_USR=”unixserv@unixserveradmin.com”

# vi /usr/local/bfd/ignore.hosts  [Prevent locking yourself out and add your own trusted IPs]

# /usr/local/sbin/bfd -s [Run the program!]

Customize your applicatoins brute force configuration, Check out the rules directory in your /usr/local/bfd Here you’ll find all kinds of pre-made rules for popular services such as Apache, and PureFTPD w00t! If you have any clue about shell scripting you can customize them or create new rules for enhanced brute force detection and prevent attacks.

July 24, 2011 Posted by | CSF, Firewall, Security, Tips & Tricks, Unix/Linux | , , , , , | Leave a comment