directadmin Tutorial How do I stop a brute force attack?

when you getting some brute force attacks recently, specially targeted on exim. you have running CSF, but it seems it doesn’t monitor exim and getting loads of emails from directadmin “brute force attack detected”, maybe you can manually block the IP and waste your time, you can add this script and put automatically block IP from brute force attack detect.

here is you can use temporary block IP or Permanent Block IP from Brute force attack.

  • Directadmin Temporary Block IP From Attacker

You can’t stop brute force attacks but you can block the IPs after a certain number of failed login attempts. The guide “I wish to have a so I can block IPs through DirectAdmin” is here:
If you have CSF + LFD installed, create a script

and add this

to save use ctrl+x press y then enter

This enables in DirectAdmin Brute Force monitor a Block IP button, which gives you possibility to block manually an IP. In the above script the IP is temporarily blocked for 24h (86400 sec).

If you want to automatically block IPs, create a script /usr/local/directadmin/scripts/custom/

then put this to your script

save, then chmod script

    • Directadmin Permanent Block IP From Attacker

if you like block permanent IP from attacker you can use this script, create

and add this to make this permanent block IP from attacker

save, then

make this scripts automatically block IPs, create a script /usr/local/directadmin/scripts/custom/

then put this to your script

save, then chmod script

This tutorial directadmin how to temporary block IP or permanent block IP from Brute Force Attack. The first part of thie guide will outline how to setup the actual firewall for the to use.  Note that we’re not able to offer any support for this setup, so use it at your own risk. Also, this file is written for a CentOS/Fedora type system and has not been tested on Debian or FreeBSD (it may work on Debian, not sure).

Leave a Reply

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