[HowTo] mod_evasive für Apache2


Es ging mir einfach eher um die Allgemeinheit - wenn jemand hier drin liest und man vorher erklärt, was der Mod macht wäre das doch gar nicht schlecht...
Hilft Neulingen doch viel einfacher sich hier rein zu finden.

Wenn jemand ständig nur Googlen wollte, dann bräuchten wir dieses ganze Forum hier nicht ;)
 
Hallo!

Wenn jemand ständig nur Googlen wollte, dann bräuchten wir dieses ganze Forum hier nicht ;)

Ein klares nein von mir. Denn dieses Forum wäre die Anlaufstelle, wenn es mit der über Google gefundenen Anleitung Probleme gibt und Detailfragen auftauchen. Das wäre ein Vorgehen, daß sicher einige User hier begrüßen würden. Teilweise ich eben keinerlei Eigeninitiative zu finden. Nicht mal die bekannten Dokumentationen werden gelesen. Stattdessen wird hier einfach auf teufel komm heraus gefragt.

Das war jetzt ein allgemeiner Standpunkt von mir und nicht speziell gegen dich gerichtet :D .

Gruß flyingoffice
 
Hallo,

da es sich hier um die Anleitung dreht und nicht darum wieso/weshalb/warum, bitte ich darum das dass Thema woanders fortgeführt wird.

Danke
 
Wenn ich in der Consule:
Code:
/usr/sbin/apxs2-prefork -cia mod_evasive20.c
eingeben, bekomme ich als Antwort:
-bash: /usr/sbin/apxs2-prefork: No such file or directory

Unter Serverinifo - Configure Command Stehst:

'./configure' '--prefix=/usr' '--datadir=/usr/share/php' '--mandir=/usr/share/man' '--bindir=/usr/bin' '--libdir=/usr/share' '--includedir=/usr/include' '--sysconfdir=/etc' '--with-_lib=lib' '--with-config-file-path=/etc' '--with-exec-dir=/usr/lib/php/bin' '--disable-debug' '--enable-inline-optimization' '--enable-memory-limit' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sigchild' '--disable-ctype' '--disable-session' '--without-mysql' '--disable-cli' '--without-pear' '--with-openssl' '--with-apxs2=/usr/sbin/apxs2-prefork' 'i586-suse-linux'

Hoffe jemand Kann helfen...
 
ich bekomme beim ausführen von /usr/sbin/apxs2-prefork -cia mod_evasive20.c


diesen Fehler


> /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
gcc: mod_evasive20.c: No such file or directory
gcc: no input files
apxs:Error: Command failed with rc=65536
.

keine Ahnung was das ist , ich daddel da schon den halben Tag dran rum und es klappt nicht :-(

ist ein Rootie mit suse 9.3 und visas
 
joop , so sieht man den Wald vor lauter Bäumen nicht :-)

ein einfaches cd /usr/local/scr/mod_evasive eingegeben und danach

/usr/sbin/apxs2-prefork -cia mod_evasive20.c


ausgeführt und es hat geklappt :-)


danke Huschi :-)
 
Vielen Dank,
nun kommen hin und wieder folgende Mails:
mod_evasive HTTP Blacklisted xx.xxx.xx.xx

Wo werden diese IP´s abgelegt?
Welches File? Kann ich das File bearbeiten?

Desweiteren kommen einige Mails dieser Art
kann es sein das die Einstellungen noch zu sensibel sind:
Code:
<IfModule mod_evasive20.c>
  DOSHashTableSize 3097
  DOSPageCount 5
  DOSSiteCount 100
  DOSPageInterval 2
  DOSSiteInterval 2
  DOSBlockingPeriod 600
  DOSEmailNotify [email protected]
</IfModule>
 
Last edited by a moderator:
Gutes FAQ, läuft auch bei mir.

Ein Frage, gibt es eine Möglichkeit die Logs irgendwo extra abzulegen inkl. der Blacklisted IP's ?

Danke Bierteufel
 
Wie finde ich heraus welches apache ich nutze?
-------------------------------------------------------------------

Also hab das auch installiert hat alles wunderbar geklappt ....laut meiner info.php ist es installiert aber wenn ich den test da ausführe kommt immer nur:
Code:
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
 
Last edited by a moderator:
Hallo!

ZB. über ein:
Code:
ps aux | grep http
dann sollte sowas kommen wie:
Code:
root     32411  0.0  0.4  33776  8612 ?        S    03:01   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun    3790  0.0  0.7  35328 14936 ?        S    09:35   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
Wie man sieht, habe ich einen prefork

Gruß flyingoffice

Edit: Einen Beitrag vollständig zu überarbeiten auf den man Antwortet ist keine feine Art, wird doch alles aus dem Zusammenhang gerissen :(
 
Last edited by a moderator:
also ich benutze wohl prefork shit hab ich es falsch installiert :-(

Code:
057:/home/hlsw # ps aux | grep http
root     23365  0.0  2.0  42300 20504 ?        Ss   13:45   0:00 /usr/sbin/httpd                                                                            
2-prefork -f /etc/apache2/httpd.conf -DSSL
 
Last edited by a moderator:
also laut der ausgabe hab ich prefork ich habe aber nur eine httpd.conf wie geht das?
 
hi,
ich würde auch gerne mod_evasive installieren und habe auch schon alle Daten runtergladen und in das richtige Verzeichnis entpackt. Ich nutze allerdings Suse 10 und dort befindet sich keine apxs2 Datei zum compilieren.

Kann mir hierzu jm. einen Tip geben?

Gruß

PS: Dies ist die Fehlermeldung:
h******:/usr/local/src/mod_evasive # /usr/sbin/apxs2 -cia mod_evasive20.c
-bash: /usr/sbin/apxs2: No such file or directory
 
Last edited by a moderator:
hi,
besten dank aber daraus entsteht schon wieder ein Problem :D.... ich habe php 5.2 per rpm von society installiert. Wenn ich jetzt das devel Packet hinzufügen möchte, will er ein php 4 Packet installieren, bzw. setzt es in Abhänigkeit dazu.

Was soll ich da machen? Soll die Abhänigkeit ignorieren oder mitinstallieren?

Gruß

edit: da ich keine andere Möglichkeit hatte das Devel-Packet zu installieren, habe ich einfach die pgp4 corefiles installiert :D
Nun bekomme ich jedoch im folgenden diese Fehler:

Befehl: /usr/sbin/apxs2 -cia mod_evasive20.c

/usr/share/apache2/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -march=i586 -mtune=i686 -fmessage-length=0 -Wall -D_FORTIFY_SO
URCE=2 -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/inclu
de/apache2 -I/usr/include/apache2 -I/usr/include/apache2 -c -o mod_evasive20.lo mod_evasive20.c && touch mod_evasive20.slo
/usr/share/apache2/build/libtool: line 1223: gcc: command not found
apxs:Error: Command failed with rc=65536

edit2: laut der grep ausgabe besitze ich anscheinend doch einen prefork
root 7688 0.0 1.6 65640 17092 ? Ss 00:21 0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
und wie man sieht, habe ich genau so wie auch hawkii nur eine httpd.conf... wieso ist das so ?!
 
Last edited by a moderator:
Sorry für den doppel-Post, aber kann mir keiner helfen? Oder habe ich etwas falsch formuliert?

Gruß
 

Back
Top