fail2ban nutzt, um Regeln für iptables zu erstellen, Filterdateien mit regular Expressions:
Code: Alles auswählen
failregex = [[]client <HOST>[]] File does not exist:
Code: Alles auswählen
[Sun Feb 10 14:27:50 2008] [error] [client 87.123.151.26] File does not exist: /var/www/_vti_bin
[Sun Feb 10 14:27:50 2008] [error] [client 87.123.151.26] File does not exist: /var/www/MSOffice
Code: Alles auswählen
89.19.4.74 - - [13/May/2008:15:56:06 +0200] "GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1" 400 226 "-" "-"
und:
Code: Alles auswählen
89.163.146.43 - - [14/May/2008:06:09:09 +0200] "GET /vhcs2/ HTTP/1.0" 404 204 "-" "Wget/1.9.1"
oder
75.144.74.225 - - [15/May/2008:05:20:41 +0200] "GET /phpMyAdmin-2.6.1-rc1/main.php HTTP/1.0" 404 227 "-" "-"
75.144.74.225 - - [15/May/2008:05:20:41 +0200] "GET /phpMyAdmin-2.6.1-rc2/main.php HTTP/1.0" 404 227 "-" "-"
75.144.74.225 - - [15/May/2008:05:20:41 +0200] "GET /phpMyAdmin-2.6.1/main.php HTTP/1.0" 404 223 "-" "-"
75.144.74.225 - - [15/May/2008:05:20:42 +0200] "GET /phpMyAdmin-2.6.1-pl1/main.php HTTP/1.0" 404 227 "-" "-"
75.144.74.225 - - [15/May/2008:05:20:42 +0200] "GET /phpMyAdmin-2.6.1-pl2/main.php HTTP/1.0" 404 227 "-" "-"
75.144.74.225 - - [15/May/2008:05:20:42 +0200] "GET /phpMyAdmin-2.6.1-pl3/main.php HTTP/1.0" 404 227 "-" "-"
75.144.74.225 - - [15/May/2008:05:20:42 +0200] "GET /phpMyAdmin-2.6.2-rc1/main.php HTTP/1.0" 404 227 "-" "-"
75.144.74.225 - - [15/May/2008:05:20:43 +0200] "GET /phpMyAdmin-2.6.2-beta1/main.php HTTP/1.0" 404 229 "-" "-"
75.144.74.225 - - [15/May/2008:05:20:43 +0200] "GET /phpMyAdmin-2.6.2-rc1/main.php HTTP/1.0" 404 227 "-" "-"
75.144.74.225 - - [15/May/2008:05:20:43 +0200] "GET /phpMyAdmin-2.6.2/main.php HTTP/1.0" 404 223 "-" "-"
75.144.74.225 - - [15/May/2008:05:20:44 +0200] "GET /phpMyAdmin-2.6.2-pl1/main.php HTTP/1.0" 404 227 "-" "-"
75.144.74.225 - - [15/May/2008:05:20:44 +0200] "GET /phpMyAdmin-2.6.3/main.php HTTP/1.0" 404 223 "-" "-"
Ich habe mich schon mal daran versucht, so einen Regex zu erstellen, aber bisher habe ich das weder ohne, noch mit Hilfe von Software geschafft.
Am besten wäre es ja, die Software würde automatisch das Muster erkennen
DANKE