Install Brute Force Detection on your Dedicated Server

Install Brute Force Detection on your Dedicated Server

Brute Force Detection is a modular shell script for parsing applicable logs and checking for authentication failures.

Hackers use the brute force method to gain access to a server these days. Installation, configuration and usage of this script is pretty simple and anybody can work with this.

Brute Force Detection is available at:

This guide will show you how to install and configure BFD to protect your dedicated server 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.

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

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

We hope you find this tutorial very useful and easy to understand. Do not hesitate to ask your questions about this tutorial via comments.

Leave a Reply

Your email address will not be published. Required fields are marked *