DirectAdmin BF IP

jet1972

Verified User
Joined
Jul 8, 2011
Messages
204
I get a lot of messages that some of DA accounts are under attack, but the emails do not contain the IP addresses of the attack origin.

How to fix this?

Kind regards,
Jan
 
Hello,

If you want to configure your server to block IPs found by DA as attacking your user accounts, please follow this link: https://help.directadmin.com/item.php?id=527 to see what you can use.

If you want emails to include an IP then you probably should disable sending of notifications in Directadmin and write your own script in /usr/local/directadmin/scripts/custom/block_ip.sh that will send emails and include IP: https://help.directadmin.com/item.php?id=549
 
Thanks Alex for answering.


This is the message I get:

"A new message or response with subject:

Brute-Force Attack detected in service log on User(s) X

has arrived for you to view."


I would like the e-mail message to include the IP information of all IPs that were involved in the attack.

How to do that?

Kind regards,
Jan
 
Jan,

OK, I see. You might consider write your own script for this as suggested above or ask Directadmin developers for it.

I've never had such a task for implementing or needs, so I don't have a ready guide for this case.
 
You could also install CSF firewall and let brute-force block them via CSF. CSF does mention ip addresses.
If it's about attacks on port 2222, so the DA login, then you could make a regex for it. And sorry, no I don't know how to make regex stuff. ;)
 
Richard,

It seems Jan is referring to the case when a single user account is under a brute-force attack from a botnet. Every single IP in this case attempts not enough times to get noticed and blocked by BFM, and there might be hundreds and/or even thousands of IPs. The lowest values in CSF if 5 failed tries (after which CSF might block an IP if it's not whitelisted or skipped), so even CSF might miss IPs with less than 5 tries.

And if this is the case I'm not even sure how much long and how easy for reading would such an email be. That's rather doubtful.
 
It seems Jan is referring to the case when a single user account is under a brute-force attack from a botnet.
Ah oke that was not clear to me.
I thought it might have been just several ip's (like about 5 or 10) and in that case he might benefit from the Distributed attack option settings in CSF, maybe combined with some regexp.

You're quite right. It's no use to react on botnet attacks with banning.
 
Back
Top