Hosting Your Own Web Server: Things to Consider Published: Nov 28, 2006
  • Rating


This guide will show you how to install and configure BFD to protect your system from brute force login hack attempts providing brute force prevention.

What is 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:

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

Updated: April 13, 2005

Lets begin!
Login to your server through SSH and su to the root user.

1. cd /root/downloads or another temporary folder where you store your files.

2. wget

3. tar -xvzf bfd-current.tar.gz

4. cd bfd-0.7

5. 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

6. Lets edit the configuration file: pico /usr/local/bfd/conf.bfd

7. Enable brute force hack attempt alerts:


Save the changes: Ctrl+X then Y

8. Prevent locking yourself out!
pico -w /usr/local/bfd/ignore.hosts and add your own trusted IPs

Save the changes: Ctrl+X then Y

BFD uses APF' cli insert feature
and as such will override any allow_hosts.rules entries users have in-place.
So be sure to add your trusted ip addresses to the ignore file to prevent
locking yourself out.

9. Run the program!
/usr/local/sbin/bfd -s

10. 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 ProFTPD 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.

Thanks to RFX Networks for creating another great script for the community, Brute Force Detection is excellent!


  • Rating


Related Articles

Comments (5)

  • Gravatar - frantz
    frantz 14:14, August 17, 2007
    I know this report is a bit dated, but it was still helpful. I"ve been considring hosting my own server for a while and just came accross this article. Just wanted to say thank you and it helped a lot.
  • Gravatar - julz
    julz 23:23, November 4, 2009
    this article is very useful , im currently planning to build my own webserver, but i have some doubts and questions in mind that I would also like to ask here, <br />
    <br />
    can I use my local highspeed home internet for the server or I have to go for a business internet plan for these?, im worry about the ISP TOS but almost all thread ive read about home webhosting uses their local highspeed internet. Can you share your Ideas about these
  • Gravatar - Dedicated Server India
    Dedicated Server India 09:07, July 9, 2010
    <a href="">Dedicated Server India</a>
  • Gravatar - norhuda
    norhuda 09:50, September 22, 2010
    very good article
  • Gravatar - norhuda
    norhuda 09:51, September 22, 2010
    very good article

Add Your Thoughts is a hosting directory, not a web host.

Copyright © 1998-2019