Skip to content

Instantly share code, notes, and snippets.

@ajardin
Created August 21, 2020 18:15
Show Gist options
  • Save ajardin/55cc558118f541a9f6e91c49e38f17b7 to your computer and use it in GitHub Desktop.
Save ajardin/55cc558118f541a9f6e91c49e38f17b7 to your computer and use it in GitHub Desktop.
Defending against Apache DoS attacks
<IfModule evasive_module>
DOSHashTableSize 3097
DOSPageCount 2
DOSSiteCount 50
DOSPageInterval 1
DOSSiteInterval 1
DOSBlockingPeriod 10
</IfModule>
DOSEmailNotify [email protected]
DOSSystemCommand "su - someuser -c '/sbin/... %s ...'"
DOSLogDir "/var/lock/mod_evasive"
$ ab -kl -n 5000 -c 200 -H "Accept-Encoding: gzip, deflate" -bi https://www.XXXXX.XXX/
Benchmarking www.XXXXX.XXX (be patient)
Completed 500 requests
Completed 1000 requests
Completed 1500 requests
Completed 2000 requests
Completed 2500 requests
Completed 3000 requests
Completed 3500 requests
Completed 4000 requests
Completed 4500 requests
Completed 5000 requests
Finished 5000 requests
[...]
Concurrency Level: 200
Time taken for tests: 6.860 seconds
Complete requests: 5000
Failed requests: 0
Non-2xx responses: 4671
Keep-Alive requests: 5000
Total transferred: 14302148 bytes
HTML transferred: 12490903 bytes
Requests per second: 728.89 [#/sec] (mean)
Time per request: 274.391 [ms] (mean)
Time per request: 1.372 [ms] (mean, across all concurrent requests)
Transfer rate: 2036.06 [Kbytes/sec] received
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment