今回は「apacheのdos対策」です。
dos対策はmod_dosdetector を使用します。
インストール
cd /usr/local/src
git clone https://github.com/stanaka/mod_dosdetector.git
cd mod_dosdetector/
MakeFileの中の
/usr/sbin/apxsを/usr/bin/apxsに変えます
make install
でインストールは完了です。
設定
/etc/httpd/conf/httpd.conf
<IfModule dosdetector_module>
DoSDetection on
DoSPeriod 120
DoSThreshold 100
DoSHardThreshold 200
DoSBanPeriod 300
DoSTableSize 3600
</IfModule>
systemctl restart httpd
で完了です。
dos対策なのでddosに効果があるかは分かりません。
最後まで読んでくれてありがとうございました。
コメントを残す