You could set up a script to keep an eye on lastb (type lastb, it'll show you failed logins) for the root user and ban the top 10 (or 20 etc..) in csf..
First step, find the top 10 offenders:
Code:
lastb|grep root|awk '{print $3}'|sort|uniq -c|sort -n|awk '{print $2}'|tail -n 10
Then, ban them w/ csf like:
Code:
for m in $(lastb|grep root|awk '{print $3}'|sort|uniq -c|sort -n|awk '{print $2}'|tail -n 10);do csf -d $m;done
Put it in a script in /usr/local/bin/ or something and call it from cron daily.
Note: to see the staggering amount of people trying to log in as root and showing their attempt count, type this:
Code:
lastb|grep root|awk '{print $3}'|sort|uniq -c|sort -n
Rob