Using mod_qos is there anyway block public IP address accessing apache server, if CPU reaches certain percentage. I need to keep private IP addresses continue using the service.
Also, I am receiving Brute Force Attack from range of IP addresses, NOT a single ip addresses. This is intentional attack from someone using over 150 different range of IP addresses. All connections remains ESTABLISHED for a long time, which leads the CPU and RAM to overload. That is the reason I wanted to block public IP access. Apart from that, is there way to prevent ESTABLISHED connection to remain for longer than necessary. Also if you have any other solution please let me know.
Below, is a sample or portin of attacks I am facing:
netstat does not show you if a connection is idle or not resp. what happens at your server. Better to use mod_status or enable scoreboard logging by mod_qos using the http://mod-qos.sourceforge.net/#QS_Status directive to understand what your server is doing for those clients. In addition, I highly recommend to analyze your servers access/transfer log, to understand what's going on (before configuring any limitations).
QS_ClientPrefer in combination with QS_SrvMaxConnExcludeIP might be a simple way to limit the number of unknown clients accessing your server. You could also once read http://mod-qos.sourceforge.net/dos.html as it might show you some additional options which you want to take a closer look at.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello everyone,
Using mod_qos is there anyway block public IP address accessing apache server, if CPU reaches certain percentage. I need to keep private IP addresses continue using the service.
Also, I am receiving Brute Force Attack from range of IP addresses, NOT a single ip addresses. This is intentional attack from someone using over 150 different range of IP addresses. All connections remains ESTABLISHED for a long time, which leads the CPU and RAM to overload. That is the reason I wanted to block public IP access. Apart from that, is there way to prevent ESTABLISHED connection to remain for longer than necessary. Also if you have any other solution please let me know.
Below, is a sample or portin of attacks I am facing:
Thanks in Advance.
Rawand
Last edit: Rawand Aso 2020-02-06
netstat does not show you if a connection is idle or not resp. what happens at your server. Better to use mod_status or enable scoreboard logging by mod_qos using the http://mod-qos.sourceforge.net/#QS_Status directive to understand what your server is doing for those clients. In addition, I highly recommend to analyze your servers access/transfer log, to understand what's going on (before configuring any limitations).
QS_ClientPrefer in combination with QS_SrvMaxConnExcludeIP might be a simple way to limit the number of unknown clients accessing your server. You could also once read http://mod-qos.sourceforge.net/dos.html as it might show you some additional options which you want to take a closer look at.