Install the Apache server.
Install the Mod_evasive package.
The system will install an email service named Postfix.
Do not configure the email service.
Disable the Postfix service.
Edit the Mod_evasive configuration file.
Here is the file, before our configuration.
Here is the file, after our configuration.
Change the values on the configuration file to fit your needs.
Create a directory to store the logs.
Create an exception file.
Here is the file content.
IP addresses included in this file will not be blocked.
Configure the correct permission.
Restart the Apache service.
The DOSHASHTABLESIZE option specifies the size of the hash table that stores IP addresses.
The DOSPAGECOUNT option specifies the limit for the number of requests for the same page.
The DOSSITECOUNT option specifies the limit for the total number of requests for any object by the same client on the same site during the configured interval.
The DOSPAGEINTERVAL option specifies the interval for the page count threshold.
The DOSSITEINTERVAL option specifies the interval for the site count threshold.
The DOSBLOCKINGPERIOD option specifies the number of seconds that an IP will be blocked.
Congratulations! You successfully installed the Mod_evasive on the Apache server.