simple prevention Dos/DDos attackmod_evasive

1. install

# cd /usr/ports/www/mod_evasive/
# make install
# make clean

 

2. set config

# vim /usr/local/etc/apache22/httpd.conf
+LoadModule evasive20_module   libexec/apache22/mod_evasive20.so
+# Evasive module for DDOS
+Include etc/apache22/extra/httpd-evasive.conf

 

3. add config

# vim /usr/local/etc/apache22/extra/httpd-evasive.conf
+<IfModule mod_evasive20.c>
+   DOSHashTableSize  3097
+    DOSPageCount    5
+    DOSSiteCount    50
+    DOSPageInterval   1
+    DOSSiteInterval     1
+    DOSBlockingPeriod  10
+    DOSEmailNotify    email@mail.tw
+    DOSLogDir      "/tmp/mod_dosevasive"
+</IfModule>

more..

4. resart apache

# /usr/local/etc/rc.d/apache22 restart

:P

    全站熱搜

    zgod 發表在 痞客邦 留言(0) 人氣()