@@ -50,14 +50,14 @@ it maliciously.
5050
5151Five different module sources have been provided:
5252
53- * Apache v1.3 API: mod_evasive13.c (outdated)
54- * Apache v2.0 API: mod_evasive20.c
5553* Apache v2.4 API: mod_evasive24.c
5654* Apache v2.4 API (windows): mod_evasive24win.c
55+ * Apache v2.0 API: mod_evasive20.c
56+ * Apache v1.3 API: mod_evasive13.c (outdated)
5757* NSAPI (iPlanet): mod_evasiveNSAPI.c
5858
5959NOTE: mod_evasiveNSAPI is a port submitted by Reine Persson
< [email protected] > 60- and is not officially supported as part of the mod_evasive project.
60+ and is not officially supported as part of the mod_evasive project.
6161
6262# How it works
6363
@@ -170,24 +170,24 @@ following block to your httpd.conf:
170170## Apache (1.3/2.0/2.4)
171171```
172172<IfModule mod_evasive.c>
173- DOSEnabled true
174- DOSHashTableSize 3097
175- DOSPageCount 2
176- DOSSiteCount 50
177- DOSPageInterval 1
178- DOSSiteInterval 1
179- DOSBlockingPeriod 10
173+ DOSEnabled true
174+ DOSHashTableSize 3097
175+ DOSPageCount 2
176+ DOSSiteCount 50
177+ DOSPageInterval 1
178+ DOSSiteInterval 1
179+ DOSBlockingPeriod 10
180180</IfModule>
181181```
182182
183183Optionally you can also add the following directives:
184184
185185```
186186187- DOSSystemCommand "su - someuser -c '/sbin/... %s ...'"
188- DOSLogDir "/var/lock/mod_evasive"
189- DOSWhitelist 127.0.0.1
190- DOSWhitelistUri whitelist.*regex
187+ DOSSystemCommand "su - someuser -c '/sbin/... %s ...'"
188+ DOSLogDir "/var/lock/mod_evasive"
189+ DOSWhitelist 127.0.0.1
190+ DOSWhitelistUri whitelist.*regex
191191 DOSHTTPStatus 429
192192```
193193
@@ -209,13 +209,13 @@ LoadModule evasive_module modules/mod_evasive.so
209209
210210## NSAPI
211211SunONE (iPlanet,Netscape) Configuration
212-
212+
213213### Configure iPlanet 4.1
214214
215215Edit obj.conf:
216216```
217217Init fn="load-modules" funcs="mod_evasive_init,mod_evasive_check" shlib="/opt/ns-4.1/plugins/lib/mod_evasive.sl"
218-
218+
219219Init fn="mod_evasive_init" DOSPageCount=2 DOSSiteCount=50 DOSPageInterval=1 DOSSiteInterval=1 DOSBlockingPeriod=10 DOSWhitelist="10.60.0.7,10.65.0.10"
220220```
221221
@@ -236,7 +236,7 @@ NameTrans fn=mod_evasive_check
236236Edit magnus.conf:
237237```
238238Init fn="load-modules" funcs="mod_evasive_init,mod_evasive_check" shlib="/opt/iplanet-6.0/plugins/lib/mod_evasive.sl"
239-
239+
240240Init fn="mod_evasive_init" DOSWhitelist="10.60.0.7,10.65.0.10"
241241```
242242
@@ -325,7 +325,7 @@ Choose an alternative temp directory
325325By default "/tmp" will be used for locking mechanism, which opens some
326326security issues if your system is open to shell users.
327327
328- http://security.lss.hr/index.php?page=details&ID=LSS-2005-01-01
328+ http://security.lss.hr/index.php?page=details&ID=LSS-2005-01-01
329329
330330In the event you have nonprivileged shell users, you'll want to create a
331331directory writable only to the user Apache is running as (usually root),
@@ -353,8 +353,8 @@ blocked.
353353To whitelist an address (or range) add an entry to the Apache configuration
354354in the following fashion:
355355
356- DOSWhitelist 127.0.0.1
357- DOSWhitelist 127.0.0.*
356+ DOSWhitelist 127.0.0.1
357+ DOSWhitelist 127.0.0.*
358358
359359Wildcards can be used on up to the last 3 octets if necessary. Multiple
360360DOSWhitelist commands may be used in the configuration.
@@ -372,14 +372,18 @@ Use with caution.
372372To whitelist a URI add an entry to the Apache configuration
373373in the following fashion:
374374
375- DOSWhitelistUri /path/to/whitelisted/resource
376- DOSWhitelistUri .*whitelisted.*
375+ DOSWhitelistUri /path/to/whitelisted/resource
376+ DOSWhitelistUri .*whitelisted.*
377377
378378`DOSWhitelistUri` supports perl-style regex and matches the whole request URI
379379(everything between the domain name and the ?) against this regex.
380380
381381You can add several entries.
382382
383+ > [!CAUTION]
384+ > This is currently UNTESTED on Windows, I'm not sure it will even compile. Let
385+ > me know about any issues, or even if it does work as expected! :pray:
386+
383387# Tweaking Apache
384388
385389The keep-alive settings for your children should be reasonable enough to
@@ -411,8 +415,8 @@ Please don't use this script to DoS others without their permission.
411415# Known bugs and Issues
412416
413417- This module appears to conflict with the Microsoft Frontpage Extensions.
414- Frontpage sucks anyway, so if you're using Frontpage I assume you're asking
415- for problems, and not really interested in conserving server resources anyway.
418+ Frontpage sucks anyway, so if you're using Frontpage I assume you're asking
419+ for problems, and not really interested in conserving server resources anyway.
416420
417421- When used together with mod_rewrite, mod_rewrite seems to take priority over
418422 this. This means that Apache will always rewrite the url even during an
@@ -421,6 +425,9 @@ Please don't use this script to DoS others without their permission.
421425 https, the redirect to https will always happen. In this case you should
422426 enable mod_evasive on the https virtualhost only, as it will not have any
423427 effect on the http virtualhost.
428+
429+ - Using mpm_itk instead of the default mpm_event will cause mod_evasive to never
430+ get triggered.
424431
425432# Feedback
426433
0 commit comments