Difference between revisions of "Mod evasive"

From Atomicorp Wiki
Jump to: navigation, search
(New page: == Overview == Mod_evasive is the Denial of Service module used in [ASL]. It is designed to throttle connections when they reach above a specified threshold. == Troubleshooting == <no...)
 
(Troubleshooting)
Line 9: Line 9:
 
<nowiki>[file "mod_evasive20.c"] [line 246] [level 3] client denied by server configuration:</nowiki>
 
<nowiki>[file "mod_evasive20.c"] [line 246] [level 3] client denied by server configuration:</nowiki>
  
This message indicates the threshold has been exceeded. To increase the threshold perform the following:
+
This message indicates the threshold has been exceeded. There are two solutions, in order of more secure to less secure.
  
Step 1) Edit /etc/asl/config
+
'''Solution 1:  Increase the thresholds for mod_evasive to be less sensitive to connections.'''
 +
 
 +
Step 1) Log into the ASL GUI and Select Configure ASL, or edit /etc/asl/config
  
 
   vim /etc/asl/config
 
   vim /etc/asl/config
Line 17: Line 19:
 
Step 2) Increase the thresholds in the following fields
 
Step 2) Increase the thresholds in the following fields
  
   MODEV_DOSPageCount="5"
+
   MODEV_DOSPageCount="12"
   MODEV_DOSSiteCount="200"
+
   MODEV_DOSSiteCount="400"
 
   MODEV_DOSPageInterval="2"
 
   MODEV_DOSPageInterval="2"
 
   MODEV_DOSSiteInterval="2"
 
   MODEV_DOSSiteInterval="2"
Line 24: Line 26:
 
NOTE: These vary depending on the environment, we start by doubling the values, and then backing them off.
 
NOTE: These vary depending on the environment, we start by doubling the values, and then backing them off.
  
Step 3) Update the security policy with:
+
 
 +
MODEV_DOSPageCount="12"
 +
 
 +
This is the threshhold for the number of requests for the same page (or URI)
 +
per page interval. Once the threshhold for that interval has been exceeded,
 +
the IP address of the client will be added to the blocking list.
 +
 
 +
 
 +
MODEV_DOSSiteCount="400"
 +
 
 +
This is the threshhold for the total number of requests for any object by
 +
the same client on the same listener per site interval. Once the threshhold
 +
for that interval has been exceeded, the IP address of the client will be added
 +
to the blocking list.
 +
 
 +
 
 +
MODEV_DOSPageInterval="2"
 +
 
 +
The interval for the page count threshhold; defaults to 1 second intervals.
 +
 
 +
 
 +
MODEV_DOSSiteInterval="2"
 +
 
 +
The interval for the site count threshhold; defaults to 1 second intervals.
 +
 
 +
 
 +
MODEV_DOSBlockingPeriod="20"
 +
 
 +
The blocking period is the amount of time (in seconds) that a client will be
 +
blocked for if they are added to the blocking list. During this time, all
 +
subsequent requests from the client will result in a 403 (Forbidden) and
 +
the timer being reset (e.g. another 10 seconds). Since the timer is reset
 +
for every subsequent request, it is not necessary to have a long blocking
 +
period; in the event of a DoS attack, this timer will keep getting reset.
 +
 
 +
 
 +
Step 3) Update the security policy by running the following command as root:
 +
 
 +
  asl -s -f
 +
 
 +
 
 +
'''Solution 2:  Disable mod_evasive entirely:'''
 +
 
 +
 
 +
Step 1)  To disable mod_dosevasive just change this setting in the GUI:
 +
 
 +
From:
 +
 
 +
MODEV_ENABLED="yes"
 +
 
 +
To:
 +
 
 +
MODEV_ENABLED="no"
 +
 
 +
Or edit /etc/asl/config.
 +
 
 +
Step 2) Update the security policy by running the following command as root:
 +
 
 
   asl -s -f
 
   asl -s -f

Revision as of 11:39, 12 July 2010

Overview

Mod_evasive is the Denial of Service module used in [ASL]. It is designed to throttle connections when they reach above a specified threshold.


Troubleshooting

[file "mod_evasive20.c"] [line 246] [level 3] client denied by server configuration:

This message indicates the threshold has been exceeded. There are two solutions, in order of more secure to less secure.

Solution 1: Increase the thresholds for mod_evasive to be less sensitive to connections.

Step 1) Log into the ASL GUI and Select Configure ASL, or edit /etc/asl/config

 vim /etc/asl/config

Step 2) Increase the thresholds in the following fields

 MODEV_DOSPageCount="12"
 MODEV_DOSSiteCount="400"
 MODEV_DOSPageInterval="2"
 MODEV_DOSSiteInterval="2"

NOTE: These vary depending on the environment, we start by doubling the values, and then backing them off.


MODEV_DOSPageCount="12"

This is the threshhold for the number of requests for the same page (or URI) per page interval. Once the threshhold for that interval has been exceeded, the IP address of the client will be added to the blocking list.


MODEV_DOSSiteCount="400"

This is the threshhold for the total number of requests for any object by the same client on the same listener per site interval. Once the threshhold for that interval has been exceeded, the IP address of the client will be added to the blocking list.


MODEV_DOSPageInterval="2"

The interval for the page count threshhold; defaults to 1 second intervals.


MODEV_DOSSiteInterval="2"

The interval for the site count threshhold; defaults to 1 second intervals.


MODEV_DOSBlockingPeriod="20"

The blocking period is the amount of time (in seconds) that a client will be blocked for if they are added to the blocking list. During this time, all subsequent requests from the client will result in a 403 (Forbidden) and the timer being reset (e.g. another 10 seconds). Since the timer is reset for every subsequent request, it is not necessary to have a long blocking period; in the event of a DoS attack, this timer will keep getting reset.


Step 3) Update the security policy by running the following command as root:

 asl -s -f


Solution 2: Disable mod_evasive entirely:


Step 1) To disable mod_dosevasive just change this setting in the GUI:

From:

MODEV_ENABLED="yes"

To:

MODEV_ENABLED="no"

Or edit /etc/asl/config.

Step 2) Update the security policy by running the following command as root:

 asl -s -f
Personal tools