This question already has an answer here:
- I am under DDoS. What can I do? 4 answers
Since to days ago I'm receiving DDOS atacks in my server. I've installed mod_evasive in apache and it works right! It writes the log and send the email with de IPs.
But there's a problem: Apache doesn't add the DROP rule in iptables (or at least it doesn't appear)
I'm using apache in Plesk, the configuration file is like:
DOSHashTableSize 3097 DOSPageCount 1 DOSSiteCount 50 DOSPageInterval 1 DOSSiteInterval 1 DOSBlockingPeriod 600 DOSSystemCommand "sudo /sbin/iptables -A INPUT -s %s -j DROP" DOSEmailNotify "firstname.lastname@example.org" DOSLogDir "/var/log/evasive/"
Here is my 'sudoers' file:
apache ALL=(ALL) NOPASSWD: /sbin/iptables -A INPUT -s [0-9.]* -j DROP
But that doesn't help.
Thanks in advance.