|
|
e5b0fee |
# mod_evasive configuration
|
|
Jan ONDREJ (SAL) |
c470a5b |
LoadModule evasive24_module modules/mod_evasive24.so
|
|
|
e5b0fee |
|
|
Jan ONDREJ (SAL) |
c470a5b |
<IfModule mod_evasive24.c>
|
|
|
e5b0fee |
# The hash table size defines the number of top-level nodes for each
|
|
|
e5b0fee |
# child's hash table. Increasing this number will provide faster
|
|
|
e5b0fee |
# performance by decreasing the number of iterations required to get to the
|
|
|
e5b0fee |
# record, but consume more memory for table space. You should increase
|
|
|
e5b0fee |
# this if you have a busy web server. The value you specify will
|
|
|
e5b0fee |
# automatically be tiered up to the next prime number in the primes list
|
|
|
e5b0fee |
# (see mod_evasive.c for a list of primes used).
|
|
|
e5b0fee |
DOSHashTableSize 3097
|
|
|
e5b0fee |
|
|
|
e5b0fee |
# This is the threshhold for the number of requests for the same page (or
|
|
|
e5b0fee |
# URI) per page interval. Once the threshhold for that interval has been
|
|
|
e5b0fee |
# exceeded, the IP address of the client will be added to the blocking
|
|
|
e5b0fee |
# list.
|
|
|
e5b0fee |
DOSPageCount 2
|
|
|
e5b0fee |
|
|
|
e5b0fee |
# This is the threshhold for the total number of requests for any object by
|
|
|
e5b0fee |
# the same client on the same listener per site interval. Once the
|
|
|
e5b0fee |
# threshhold for that interval has been exceeded, the IP address of the
|
|
|
e5b0fee |
# client will be added to the blocking list.
|
|
|
e5b0fee |
DOSSiteCount 50
|
|
|
e5b0fee |
|
|
|
e5b0fee |
# The interval for the page count threshhold; defaults to 1 second
|
|
|
e5b0fee |
# intervals.
|
|
|
e5b0fee |
DOSPageInterval 1
|
|
|
e5b0fee |
|
|
|
e5b0fee |
# The interval for the site count threshhold; defaults to 1 second
|
|
|
e5b0fee |
# intervals.
|
|
|
e5b0fee |
DOSSiteInterval 1
|
|
|
e5b0fee |
|
|
|
e5b0fee |
# The blocking period is the amount of time (in seconds) that a client will
|
|
|
e5b0fee |
# be blocked for if they are added to the blocking list. During this time,
|
|
|
e5b0fee |
# all subsequent requests from the client will result in a 403 (Forbidden)
|
|
|
e5b0fee |
# and the timer being reset (e.g. another 10 seconds). Since the timer is
|
|
|
e5b0fee |
# reset for every subsequent request, it is not necessary to have a long
|
|
|
e5b0fee |
# blocking period; in the event of a DoS attack, this timer will keep
|
|
|
e5b0fee |
# getting reset.
|
|
|
e5b0fee |
DOSBlockingPeriod 10
|
|
|
e5b0fee |
|
|
|
e5b0fee |
# If this value is set, an email will be sent to the address specified
|
|
|
e5b0fee |
# whenever an IP address becomes blacklisted. A locking mechanism using
|
|
|
e5b0fee |
# /tmp prevents continuous emails from being sent.
|
|
|
e5b0fee |
#
|
|
|
e5b0fee |
# NOTE: Requires /bin/mail (provided by mailx)
|
|
|
e5b0fee |
#DOSEmailNotify you@yourdomain.com
|
|
|
e5b0fee |
|
|
|
e5b0fee |
# If this value is set, the system command specified will be executed
|
|
|
e5b0fee |
# whenever an IP address becomes blacklisted. This is designed to enable
|
|
|
e5b0fee |
# system calls to ip filter or other tools. A locking mechanism using /tmp
|
|
|
e5b0fee |
# prevents continuous system calls. Use %s to denote the IP address of the
|
|
|
e5b0fee |
# blacklisted IP.
|
|
|
e5b0fee |
#DOSSystemCommand "su - someuser -c '/sbin/... %s ...'"
|
|
|
e5b0fee |
|
|
|
e5b0fee |
# Choose an alternative temp directory By default "/tmp" will be used for
|
|
|
e5b0fee |
# locking mechanism, which opens some security issues if your system is
|
|
|
e5b0fee |
# open to shell users.
|
|
|
e5b0fee |
#
|
|
|
e5b0fee |
# http://security.lss.hr/index.php?page=details&ID=LSS-2005-01-01
|
|
|
e5b0fee |
#
|
|
|
e5b0fee |
# In the event you have nonprivileged shell users, you'll want to create a
|
|
|
e5b0fee |
# directory writable only to the user Apache is running as (usually root),
|
|
|
e5b0fee |
# then set this in your httpd.conf.
|
|
|
e5b0fee |
#DOSLogDir "/var/lock/mod_evasive"
|
|
|
e5b0fee |
|
|
|
e5b0fee |
# You can use whitelists to disable the module for certain ranges of
|
|
|
e5b0fee |
# IPs. Wildcards can be used on up to the last 3 octets if necessary.
|
|
|
e5b0fee |
# Multiple DOSWhitelist commands may be used in the configuration.
|
|
|
e5b0fee |
#DOSWhitelist 127.0.0.1
|
|
|
e5b0fee |
#DOSWhitelist 192.168.0.*
|
|
|
e5b0fee |
</IfModule>
|