Default Index Page on New Accounts Published: Oct 28, 2003
  • Rating

    4/5

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

Requirements:
- 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 http://www.rfxnetworks.com/downloads/bfd-current.tar.gz

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

4. cd bfd-0.7

5. Run the install file: ./install.sh
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:
Find: ALERT_USR="0"   CHANGE TO: ALERT_USR="1"   

Find: EMAIL_USR="root" CHANGE TO: EMAIL_USR="your@yourdomain.com"

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
Eg: 192.168.1.1

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!

Cheers
Steve

  • Rating

    4/5

Related Articles

Comments (10)

  • Gravatar - Jake Norton
    Jake Norton 20:24, January 30, 2004
    Well done on this tutorial, it really helped me :D!
  • Gravatar - Smith
    Smith 02:25, August 18, 2004
    hello ..<br />
    <br />
    thanks alot great post but how can i upload the file ??<br />
    <br />
    please help ..<br />
    <br />
    regards
  • Gravatar - man5t
    man5t 17:33, January 9, 2005
    How can i upload "index.html" to <br />
    /cpanel3-skel/public_html ? <br />
    <br />
    Using FTP can't login to root .<br />
    <br />
    Thanks for help
  • Gravatar - r|cKy
    r|cKy 21:46, May 9, 2005
    Using SSH to upload your file.
  • Gravatar - Tan
    Tan 18:23, September 5, 2005
    Can someone please give details of how to upload a file into /cpanel3-skel/public_html via SSH. I can't ftp into the root.
  • Gravatar - CAESAR
    CAESAR 16:00, January 20, 2006
    Thanks a lot.<br />
    <br />
    I think only resellers can FTP to <br />
    /home/username/cpanel3-skel/public_html
  • Gravatar - Nedal_tarout
    Nedal_tarout 05:24, August 15, 2006
    you can use wget to recive a file form any site after your uploded ... <br />
    <br />
    1- uplode index.html in any site via using ftp .<br />
    2- use wget www.domin.com/index.html <br />
    3- done .<br />
    <br />
    4- say thansk to nedal :)<br />
    <br />
    bye
  • Gravatar - Dmitry Dovidenko
    Dmitry Dovidenko 07:41, September 19, 2006
    You can also use SCP if you use Linux to transfer the file:<br />
    <br />
    cd /home/wherever/<br />
    <br />
    scp someimage.jpg root@someserver.com:/home/someuser/cpanel3-skel/
  • Gravatar - PHPSugar.com
    PHPSugar.com 12:54, May 29, 2008
    If you're using SSH please CD to /root/cpanel3-skel/public_html<br />
    <br />
    You'll be able to create or modify your existing index.html
  • Gravatar - KG Customs
    KG Customs 05:53, May 31, 2009
    Maybe I'm missing something obvious, but I designed my index.html page, uploaded it to (the right folder) - but it doesn't show up?

Add Your Thoughts

WebHostGear.com is a hosting directory, not a web host.

Copyright © 1998-2019 WebHostGear.com