Skip to content

Instantly share code, notes, and snippets.

@chihirokaasan
Created February 18, 2016 01:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chihirokaasan/9851f158c8025e8c98c1 to your computer and use it in GitHub Desktop.
Save chihirokaasan/9851f158c8025e8c98c1 to your computer and use it in GitHub Desktop.
/etc/httpd/conf.d/mod_evasive.conf
LoadModule evasive20_module modules/mod_evasive20.so
<IfModule mod_evasive20.c>
DOSHashTableSize 3097
#1秒間に何回同じページにアクセスされたら
DOSPageCount 5
#1秒間に何回サイトにアクセスされたら
DOSSiteCount 30
#1秒間でのページアクセス
DOSPageInterval 1
#1秒間でのサイトアクセス
DOSSiteInterval 1
#ブロック時間
DOSBlockingPeriod 30
#アラートをメールで飛ばす
DOSEmailNotify "-s 'DoS Alert' hoge@kaasan.info"
#ログディレクトリ
DOSLogDir "/var/lock/mod_evasive"
#テスト実行時にはコメントアウトしておくこと
DOSWhitelist 127.0.0.1
#テスト実行時にはコメントアウトしておくこと
DOSWhitelist 192.168.1.*
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment