funktioniert :roll:
wenn ich so mache bekomme ich eine FehlermeldungGetestet wurde dieses HowTo auf folgendem System:
* SuSe 9.3
* Apache 2.x - Prefork
1. Aktuelles Paket runterladen
2. In /usr/local/src/mod_evasive entpacken
3. In das Verzeichnis mod_evasive wechseln
4. Mit dem Editor Deiner Wahl mod_evasive20.c öffnen
5. Die Zeile 45 umändern in
Code:
#define MAILER "/bin/mail -t %s"
6. Je nachdem, welchen Apache Du wie einsetzt, folgenden APXS ausführen, um das Modul zu kompilieren.
Apache2:
Code:
/usr/sbin/apxs2 -cia mod_evasive20.c
Apache2-Prefork:
Code:
/usr/sbin/apxs2-prefork -cia mod_evasive20.c
7. Eine eigene Conf-Datei für mod_evasive anlegen
Code:
touch /etc/apache2/conf.d/mod_evasive.conf
8. Mit dem Editor Deiner Wahl folgenden Inhalt (je nachdem ob Prefork oder nicht) in die eben erstellte mod_evasive.conf
Apache2:
Code:
LoadModule evasive20_module /usr/lib/apache2/mod_evasive20.so
Apache2-Prefork:
Code:
LoadModule evasive20_module /usr/lib/apache2-prefork/mod_evasive20.so
und danach dann danach bei beiden folgendes in die gleiche Datei:
Code:
<IfModule mod_evasive20.c> DOSHashTableSize 3097 DOSPageCount 5 DOSSiteCount 100 DOSPageInterval 2 DOSSiteInterval 2 DOSBlockingPeriod 600 DOSEmailNotify deine@email-adresse.de </IfModule>
9. rcapache2 stop
10. rcapache2 start
Das war's dann auch schon. Nun einfach mal mit der mitgelieferten test.pl den Server versuchen zu "nuken":
Code:
cd /usr/src/mod_evasive perl test.pl
Am Anfang kommen HTTP OK und dann sollte es sich auf 403 Forbidden Antworten ändern. Geschieht dies, ist alles glatt gelaufen!
Ich habe auch schon über Google gesucht aber nichts brauchbares gefunden/usr/local/src/mod_evasive # /usr/sbin/apxs2-prefork -cia mod_evasive20.c
/usr/share/apache2/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -g -fPIC -Wall -fno-strict-aliasing -D_LARGEFILE_SOURCE -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DAP_DEBUG -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -pthread -I/usr/include/apache2-prefork -I/usr/include/apache2 -I/usr/include/apache2 -c -o mod_evasive20.lo mod_evasive20.c && touch mod_evasive20.slo
mod_evasive20.c: In function `access_checker':
mod_evasive20.c:212: warning: implicit declaration of function `getpid'
mod_evasive20.c:212: warning: long int format, int arg (arg 3)
mod_evasive20.c: At top level:
mod_evasive20.c:327: warning: no previous prototype for `ntt_node_create'
mod_evasive20.c: In function `destroy_hit_list':
mod_evasive20.c:301: warning: control reaches end of non-void function
mod_evasive20.c: In function `create_hit_list':
mod_evasive20.c:118: warning: control reaches end of non-void function
/usr/share/apache2/build/libtool --silent --mode=link gcc -o mod_evasive20.la -rpath /usr/lib/apache2-prefork -module -avoid-version mod_evasive20.lo
/usr/share/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/apache2/build/libtool' mod_evasive20.la /usr/lib/apache2-prefork
/usr/share/apache2/build/libtool --mode=install cp mod_evasive20.la /usr/lib/apache2-prefork/
cp .libs/mod_evasive20.so /usr/lib/apache2-prefork/mod_evasive20.so
cp .libs/mod_evasive20.lai /usr/lib/apache2-prefork/mod_evasive20.la
cp .libs/mod_evasive20.a /usr/lib/apache2-prefork/mod_evasive20.a
ranlib /usr/lib/apache2-prefork/mod_evasive20.a
chmod 644 /usr/lib/apache2-prefork/mod_evasive20.a
PATH="$PATH:/sbin" ldconfig -n /usr/lib/apache2-prefork
----------------------------------------------------------------------
Libraries have been installed in:
/usr/lib/apache2-prefork
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
chmod 755 /usr/lib/apache2-prefork/mod_evasive20.so
apxs:Error: Config file /etc/apache2/httpd2-prefork.conf not found.
h897777:/usr/local/src/mod_evasive #
$APACHE_ROOT/bin/apxs -i -a -c mod_evasive20.c versucht da kommt das gleiche :roll: