EA4 - Mod_evasive - Nginx Proxy - Layer 7 DDOS Attacks

007basaran

Active Member
Feb 21, 2017
40
6
8
Turkey
cPanel Access Level
DataCenter Provider
Hello,

Linux CentOS can do DDoS protection settings on any server, but this is not possible in cPanel.

I can activate CSF + Nginx + Mod_evasive with any control panel and provide protection. I tested it.

We use Easyapache 4.

HTTP, GET, POST, HEAD - Protection against DDoS attacks is not possible as far as I know from cPanel.

How to use easyapache4 any mod_evasive or nginx proxy or layer 7ddos protection?

Please help

cPanel is a very good system.

I do not want to give up using cPanel.

Thank you all.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,205
363
Hello,

No native support exists for the Apache mod_evasive module in EasyApache 4. You would have to build a custom RPM for this module using the guidelines at:

ea4.ninja

I encourage you to open a feature request if it's something you like to see included as an option in EasyApache 4:

Submit A Feature Request

Additionally, you may find this thread helpful if you are open to different solutions:

How to block strange massive traffic flooding the website

Thank you.
 
  • Like
Reactions: 007basaran

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,205
363
There's no easy method of installing that module, as you'd need to develop a custom RPM per the URL referenced in the last response. You can find a list of companies offering system administration services at the following URL if you require help with this level of customization:

System Administration Services | cPanel Forums

Thank you.
 

JacobPerkins

Well-Known Member
May 2, 2014
617
97
103
cPanel Access Level
DataCenter Provider
Twitter
Hi,

This can be added to EA4 as easily as the following:
Code:
 1011  2017-03-01 09:04:56 wget 'https://raw.githubusercontent.com/shivaas/mod_evasive/master/mod_evasive24.c'
 1012  2017-03-01 09:05:00 /usr/bin/apxs -i -a -c mod_evasive24.c
 1013  2017-03-01 09:05:07 less /etc/apache2/conf.modules.d/mod_evasive20.conf
 1014  2017-03-01 09:05:12 /scripts/restartsrv_httpd
 

007basaran

Active Member
Feb 21, 2017
40
6
8
Turkey
cPanel Access Level
DataCenter Provider
Hello, @cPanelMichael

Installation was done but not working or not active.

I did a GET and POST or HTTP request layer 7 attack to test if it worked.

Attacks must be blocked while mod_evasive is running.

I tested it on a different server.
Attacks on a different server are blocking but, CPanel - is not blocked in EasyApache 4.

Regards.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,205
363
Hello @007basaran,

Could you try testing with the test.pl file offered on the GitHub repo? It's located at:

mod_evasive/test.pl at master · shivaas/mod_evasive · GitHub

Here's a quote from the README:

TESTING

Want to make sure it's working? Run test.pl, and view the response codes. It's best to run it several times on the same machine as the web server until you get 403 Forbidden messages. Some larger servers with high child counts may require more of a beating than smaller servers before blacklisting addresses.

Please don't use this script to DoS others without their permission.
Thank you.
 
  • Like
Reactions: 007basaran

007basaran

Active Member
Feb 21, 2017
40
6
8
Turkey
cPanel Access Level
DataCenter Provider
Test here.


Code:
[[email protected] arge]# ./test.pl
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,205
363
  • Like
Reactions: 007basaran

007basaran

Active Member
Feb 21, 2017
40
6
8
Turkey
cPanel Access Level
DataCenter Provider
Hello,

Installing steps mod_evasive for ea4:

yum install ea4-experimental
yum install ea-apache24-mod_evasive

Available any module for Easy Apache4 Listing :
yum --disablerepo="*" --enablerepo="EA4-experimental" list available

Installing complated but mod_evasive not working :

Code:
./test.pl
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
Screenshot
 
Last edited: