Zitat von ndurchx;37152Kannst du bitte mal das Script von Hand ausführen und sehen ob es so funktioniert?
./sync.sh 1.1.1.1 add
Habe ich gemacht.
Die IP wird nur bei IPv6 angezeigt
Zitat von ndurchx;37152Kannst du bitte mal das Script von Hand ausführen und sehen ob es so funktioniert?
./sync.sh 1.1.1.1 add
Habe ich gemacht.
Die IP wird nur bei IPv6 angezeigt
Ferndiagnose ist nicht ganz so einfach.
Ich hab das Script aber etwas abgeändert, versucht das mal.
http://blog.n-durch-x.de/2011/…2ban-auf-netcup-vservern/
Wenn das auch nicht funktioniert, bräuchte ich von euch mehr Infos (OS, Output wenn ihrs von Hand ausführt [und am besten auch noch Zugang zu eurem VCP und SSH auf eurem Server :eek:].
Wenn Ihr mir keinen Zugang gebt (was ich auch nicht machen würde), ihr mir aber den Output schickt, müsst Ihr bei diesem auch noch eure Zugangsdaten entfernen.
Keine Änderung in der Funktion.
OS: Debian Squeeze 64Bit (Image von Netcup)
vServer Gold
Output:
root@srv01:/etc/fail2ban/action.d# ./sync.sh 1.1.1.1 add
./sync.sh: 59: [[: not found
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 5771 100 5771 0 0 72266 0 --:--:-- --:--:-- --:--:-- 115k
<div class='successbox'>
???Filter.added???
</div>
./sync.sh: 100: [[: not found
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'
'http://www.w3.org/TR/html4/loose.dtd'>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
<link rel='stylesheet' type='text/css' href='/skyblue.css'>
<script type='text/javascript' src='/script/prototype.js'></script>
<script type='text/javascript' src='/script/script.js'></script>
<script type='text/javascript' src='/script/scriptaculous/scriptaculous.js'></script>
<title>VCP | Logout</title>
</head>
<body>
<div class='dialogbox loginbox'>
<h1>VCP | Logout</h1>
<p>You have been logged out.</p>
<form action='Login' method='post'>
<div class='largeButton'>
<input type='submit' name='' value='Home'>
</div>
</form>
</div>
</body>
</html>
Alles anzeigen
Beim IP löschen scheint es zu hapern.
root@srv01:/etc/fail2ban/action.d# ./sync.sh 1.1.1.1 del
./sync.sh: 59: [[: not found
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 5771 100 5771 0 0 50525 0 --:--:-- --:--:-- --:--:-- 68702
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 154k 0 154k 0 0 1269k 0 --:--:-- --:--:-- --:--:-- 1697k
<div class='successbox'>
???Filter.deleted???
</div>
./sync.sh: 100: [[: not found
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'
'http://www.w3.org/TR/html4/loose.dtd'>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
<link rel='stylesheet' type='text/css' href='/skyblue.css'>
<script type='text/javascript' src='/script/prototype.js'></script>
<script type='text/javascript' src='/script/script.js'></script>
<script type='text/javascript' src='/script/scriptaculous/scriptaculous.js'></script>
<title>VCP | Logout</title>
</head>
<body>
<div class='dialogbox loginbox'>
<h1>VCP | Logout</h1>
<p>You have been logged out.</p>
<form action='Login' method='post'>
<div class='largeButton'>
<input type='submit' name='' value='Home'>
</div>
</form>
</div>
</body>
</html>
Alles anzeigen
Zwei Zeilen sind mir gerade ins Auge gesprungen:
Hi,
es gibt eine neue Version des Scriptes. Bitte aktualisieren.
http://blog.n-durch-x.de/2011/…2ban-auf-netcup-vservern/
Bisher war das Entfernen eines bans anscheinend unzuverlässig.
Sehr schön! Das mit dem bash war es. Nun geht es bei mir auch Vielen Dank Dir!
Zitat von Bulli;37151Nein, das stört nicht, aber bei mir werden die v4 adressen nicht unter v4 angezeigt.
Im Anhang mal wie es bei mir unter dem Reiter v4 aussieht.
Ich hab das selbe Problem..
Ausgezeichnet, jetzt geht es bei mir auch...
Vielen Dank!
Hallo,
ersteinmal vielen Lieben dank für das script.
Ich habe es direkt auf meinem vServer uranus eingerichtet.
Manuell kann ich die Adressen hinzufügen und auch löschen das klappt alles super.
Jedoch geschieht bei mir automatisiert nichts.
die Filter habe ich beim Standard belassen und nichts daran geändert.
Wenn ich nun via ssh auf meinen Server verbinde und mehrmals das Kennwort von der Passphrase meines keys falsch eingebe,
dann werde ich dennoch nicht gesperrt. Irgendwann muss doch die Regel greifen?
Kann mir da vielleicht jemand freundlicher Weise helfen?
sync.conf
[Definition]
# Option: actionstart
# Notes.: command executed once at the start of Fail2Ban.
# Values: CMD
#
actionstart =
# Option: actionstop
# Notes.: command executed once at the end of Fail2Ban
# Values: CMD
#
actionstop =
# Option: actioncheck
# Notes.: command executed once before each actionban command
# Values: CMD
#
actioncheck =
# Option: actionban
# Notes.: command executed when banning an IP. Take care that the
# command is executed with Fail2Ban user rights.
# Tags: <ip> IP address
# <failures> number of failures
# <time> unix timestamp of the ban time
# Values: CMD
#
actionban = /etc/fail2ban/action.d/sync.sh <ip> add
# Option: actionunban
# Notes.: command executed when unbanning an IP. Take care that the
# command is executed with Fail2Ban user rights.
# Tags: <ip> IP address
# <failures> number of failures
# <time> unix timestamp of the ban time
# Values: CMD
#
actionunban = /etc/fail2ban/action.d/sync.sh <ip> del
Alles anzeigen
jail.conf
# Fail2Ban configuration file.
#
# This file was composed for Debian systems from the original one
# provided now under /usr/share/doc/fail2ban/examples/jail.conf
# for additional examples.
#
# To avoid merges during upgrades DO NOT MODIFY THIS FILE
# and rather provide your changes in /etc/fail2ban/jail.local
#
# Author: Yaroslav O. Halchenko <debian@onerussian.com>
#
# $Revision: 281 $
#
# The DEFAULT allows a global definition of the options. They can be override
# in each jail afterwards.
[DEFAULT]
# "ignoreip" can be an IP address, a CIDR mask or a DNS host
ignoreip = 127.0.0.1
bantime = 7200
findtime = 600
maxretry = 3
# "backend" specifies the backend used to get files modification. Available
# options are "gamin", "polling" and "auto".
# yoh: For some reason Debian shipped python-gamin didn't work as expected
# This issue left ToDo, so polling is default backend for now
backend = polling
#
# Destination email address used solely for the interpolations in
# jail.{conf,local} configuration files.
destemail = steffen.sandow@googlemail.com
#
# ACTIONS
#
# Default banning action (e.g. iptables, iptables-new,
# iptables-multiport, shorewall, etc) It is used to define
# action_* variables. Can be overriden globally or per
# section within jail.local file
banaction = iptables-multiport
# email action. Since 0.8.1 upstream fail2ban uses sendmail
# MTA for the mailing. Change mta configuration parameter to mail
# if you want to revert to conventional 'mail'.
mta = sendmail
# Default protocol
protocol = tcp
#
# Action shortcuts. To be used to define action parameter
# The simplest action to take: ban only
action_ = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s]
# ban & send an e-mail with whois report to the destemail.
action_mw = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s]
%(mta)s-whois[name=%(__name__)s, dest="%(destemail)s", protocol="%(protocol)s]
# ban & send an e-mail with whois report and relevant log lines
# to the destemail.
action_mwl = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s]
%(mta)s-whois-lines[name=%(__name__)s, dest="%(destemail)s", logpath=%(logpath)s]
# Choose default action. To change, just override value of 'action' with the
# interpolation to the chosen action shortcut (e.g. action_mw, action_mwl, etc) in jail.local
# globally (section [DEFAULT]) or per specific section
action = sync
#
# JAILS
#
# Next jails corresponds to the standard configuration in Fail2ban 0.6 which
# was shipped in Debian. Enable any defined here jail by including
#
# [SECTION_NAME]
# enabled = true
#
# in /etc/fail2ban/jail.local.
#
# Optionally you may override any other parameter (e.g. banaction,
# action, port, logpath, etc) in that section within jail.local
[ssh]
enabled = true
port = ssh
filter = sshd
logpath = /var/log/auth.log
maxretry = 3
# Generic filter for pam. Has to be used with action which bans all ports
# such as iptables-allports, shorewall
[pam-generic]
enabled = false
# pam-generic filter can be customized to monitor specific subset of 'tty's
filter = pam-generic
# port actually must be irrelevant but lets leave it all for some possible uses
port = all
banaction = iptables-allports
port = anyport
logpath = /var/log/auth.log
maxretry = 3
[xinetd-fail]
enabled = false
filter = xinetd-fail
port = all
banaction = iptables-multiport-log
logpath = /var/log/daemon.log
maxretry = 2
[ssh-ddos]
enabled = true
port = ssh
filter = sshd-ddos
logpath = /var/log/auth.log
maxretry = 3
#
# HTTP servers
#
[apache]
enabled = false
port = http,https
filter = apache-auth
logpath = /var/log/apache*/*error.log
maxretry = 3
# default action is now multiport, so apache-multiport jail was left
# for compatibility with previous (<0.7.6-2) releases
[apache-multiport]
enabled = false
port = http,https
filter = apache-auth
logpath = /var/log/apache*/*error.log
maxretry = 3
[apache-noscript]
enabled = false
port = http,https
filter = apache-noscript
logpath = /var/log/apache*/*error.log
maxretry = 3
[apache-overflows]
enabled = false
port = http,https
filter = apache-overflows
logpath = /var/log/apache*/*error.log
maxretry = 2
#
# FTP servers
#
[vsftpd]
enabled = false
port = ftp,ftp-data,ftps,ftps-data
filter = vsftpd
logpath = /var/log/vsftpd.log
# or overwrite it in jails.local to be
# logpath = /var/log/auth.log
# if you want to rely on PAM failed login attempts
# vsftpd's failregex should match both of those formats
maxretry = 3
[proftpd]
enabled = false
port = ftp,ftp-data,ftps,ftps-data
filter = proftpd
logpath = /var/log/proftpd/proftpd.log
maxretry = 3
[wuftpd]
enabled = false
port = ftp,ftp-data,ftps,ftps-data
filter = wuftpd
logpath = /var/log/auth.log
maxretry = 3
#
# Mail servers
#
[postfix]
enabled = false
port = smtp,ssmtp
filter = postfix
logpath = /var/log/mail.log
[couriersmtp]
enabled = false
port = smtp,ssmtp
filter = couriersmtp
logpath = /var/log/mail.log
#
# Mail servers authenticators: might be used for smtp,ftp,imap servers, so
# all relevant ports get banned
#
[courierauth]
enabled = false
port = smtp,ssmtp,imap2,imap3,imaps,pop3,pop3s
filter = courierlogin
logpath = /var/log/mail.log
[sasl]
enabled = false
port = smtp,ssmtp,imap2,imap3,imaps,pop3,pop3s
filter = sasl
# You might consider monitoring /var/log/warn.log instead
# if you are running postfix. See http://bugs.debian.org/507990
logpath = /var/log/mail.log
# DNS Servers
# These jails block attacks against named (bind9). By default, logging is off
# with bind9 installation. You will need something like this:
#
# logging {
# channel security_file {
# file "/var/log/named/security.log" versions 3 size 30m;
# severity dynamic;
# print-time yes;
# };
# category security {
# security_file;
# };
# };
#
# in your named.conf to provide proper logging
# !!! WARNING !!!
# Since UDP is connectionless protocol, spoofing of IP and immitation
# of illegal actions is way too simple. Thus enabling of this filter
# might provide an easy way for implementing a DoS against a chosen
# victim. See
# http://nion.modprobe.de/blog/archives/690-fail2ban-+-dns-fail.html
# Please DO NOT USE this jail unless you know what you are doing.
#[named-refused-udp]
#
#enabled = false
#port = domain,953
#protocol = udp
#filter = named-refused
#logpath = /var/log/named/security.log
[named-refused-tcp]
enabled = false
port = domain,953
protocol = tcp
filter = named-refused
logpath = /var/log/named/security.log
Alles anzeigen
fail2ban.conf
# Fail2Ban configuration file
#
# Author: Cyril Jaquier
#
# $Revision: 629 $
#
[Definition]
# Option: loglevel
# Notes.: Set the log level output.
# 1 = ERROR
# 2 = WARN
# 3 = INFO
# 4 = DEBUG
# Values: NUM Default: 3
#
loglevel = 3
# Option: logtarget
# Notes.: Set the log target. This could be a file, SYSLOG, STDERR or STDOUT.
# Only one log target can be specified.
# Values: STDOUT STDERR SYSLOG file Default: /var/log/fail2ban.log
#
logtarget = /var/log/fail2ban.log
# Option: socket
# Notes.: Set the socket file. This is used to communicate with the daemon. Do
# not remove this file when Fail2ban runs. It will not be possible to
# communicate with the server afterwards.
# Values: FILE Default: /var/run/fail2ban/fail2ban.sock
#
socket = /var/run/fail2ban/fail2ban.sock
Alles anzeigen
Um folgendes auszuschließen:
Die benötigten Daten im init-bereich der sync.sh sind korrekt
die sync.sh ist unverändert (bis auf die Logindaten)
manuelle eintragungen über die Console in die FW des VCP sind problemlos möglich
[edit] fast vergessen:
ich verwende ubuntu 11.4 (beta)
hatte das gleiche problem aber auch bereits auf ubuntu 10.4 LTS
Danke im Voraus an alle, welche sich den Kopf für mich zerbrechen.
Kannst du mal die Logfiles checken?
/var/log/fail2ban.log
Hier müsste etwas in der Art stehen:
2011-08-05 15:59:05,900 fail2ban.actions: WARNING [ssh] Ban 199.21.149.38
2011-08-05 15:53:24,827 fail2ban.actions: WARNING [ssh] Unban 199.21.149.38
Wenn das nicht der Fall ist, dann greifen die Standardfilter für ssh offensichtlich nicht.
Der SSH-Filter checkt die Datei /var/log/auth.log
Schau mal, ob du dort Hinweise auf fehlgeschlagene Login-Versuche findest. Wenn ja, vergleiche eine solche Zeile mal mit dem SSH-Filter und schau ob eine der RegEx dort passen könnte.
Und nur fürs Protokoll:
Die Datei sync.sh ist ausführbar, richtig? Ich gehe davon aus, dass es so ist, weil der manuelle Aufruf ja auch funktioniert. Aber sicher ist sicher
hallo,
ja die sync.sh ist ausführbar und nur ausführbar r und w habe ich nicht vergeben.
In der fail2ban.log steht nichts derartiges drin.
2011-08-24 11:19:59,470 fail2ban.server : INFO Changed logging target to /var/log/fail2ban.log for Fail2ban v0.8.4-SVN
2011-08-24 11:19:59,471 fail2ban.jail : INFO Creating new jail 'ssh'
2011-08-24 11:19:59,471 fail2ban.jail : INFO Jail 'ssh' uses poller
2011-08-24 11:19:59,481 fail2ban.filter : INFO Added logfile = /var/log/auth.log
2011-08-24 11:19:59,481 fail2ban.filter : INFO Set maxRetry = 3
2011-08-24 11:19:59,482 fail2ban.filter : INFO Set findtime = 600
2011-08-24 11:19:59,483 fail2ban.actions: INFO Set banTime = 7200
2011-08-24 11:19:59,508 fail2ban.jail : INFO Creating new jail 'ssh-ddos'
2011-08-24 11:19:59,508 fail2ban.jail : INFO Jail 'ssh-ddos' uses poller
2011-08-24 11:19:59,508 fail2ban.filter : INFO Added logfile = /var/log/auth.log
2011-08-24 11:19:59,509 fail2ban.filter : INFO Set maxRetry = 3
2011-08-24 11:19:59,509 fail2ban.filter : INFO Set findtime = 600
2011-08-24 11:19:59,510 fail2ban.actions: INFO Set banTime = 7200
2011-08-24 11:19:59,513 fail2ban.jail : INFO Creating new jail 'apache'
2011-08-24 11:19:59,513 fail2ban.jail : INFO Jail 'apache' uses poller
2011-08-24 11:19:59,514 fail2ban.filter : INFO Added logfile = /var/log/apache2/error.log
2011-08-24 11:19:59,514 fail2ban.filter : INFO Set maxRetry = 3
2011-08-24 11:19:59,515 fail2ban.filter : INFO Set findtime = 600
2011-08-24 11:19:59,515 fail2ban.actions: INFO Set banTime = 7200
2011-08-24 11:19:59,519 fail2ban.jail : INFO Creating new jail 'apache-multiport'
2011-08-24 11:19:59,519 fail2ban.jail : INFO Jail 'apache-multiport' uses poller
2011-08-24 11:19:59,519 fail2ban.filter : INFO Added logfile = /var/log/apache2/error.log
2011-08-24 11:19:59,520 fail2ban.filter : INFO Set maxRetry = 3
2011-08-24 11:19:59,520 fail2ban.filter : INFO Set findtime = 600
2011-08-24 11:19:59,520 fail2ban.actions: INFO Set banTime = 7200
2011-08-24 11:19:59,524 fail2ban.jail : INFO Jail 'ssh' started
2011-08-24 11:19:59,527 fail2ban.jail : INFO Jail 'ssh-ddos' started
2011-08-24 11:19:59,529 fail2ban.jail : INFO Jail 'apache' started
2011-08-24 11:19:59,532 fail2ban.jail : INFO Jail 'apache-multiport' started
Alles anzeigen
jedoch im Log (jeweils ip durch [ip], port durch [port] und username durch [username] ersetzt )
Aug 24 11:57:27 your-path sshd[20734]: Failed password for [username] from [ip] port [port] ssh2
Aug 24 11:58:05 your-path sshd[20734]: last message repeated 4 times
Aug 24 11:58:23 your-path sshd[20734]: Failed password for [username] from [ip] port [port] ssh2
Aug 24 11:58:23 your-path sshd[20734]: PAM 5 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=[ip] user=[username]
Aug 24 11:58:23 your-path sshd[20734]: PAM service(sshd) ignoring max retries; 6 > 3
Aug 24 12:00:57 your-path sshd[28625]: pam_unix(sshd:session): session closed for user [username]
also scheinen wirklich die Filter nicht zu greifen denn es würden einige Einträge aus dem Logfile zutreffen!
sollte man weiteren quellcode benötigen, so schreibe ich den hier gerne ein.
[edit]
bin gerade auf etwas gestoßen!
im Filter steht:
somit kann der das ja nicht finden oder?
Weil die Zeile im meinem Log endet ja mit ssh2 und laut der regex (so wie ich es verstehe) ssh bzw. sshd.
Falls dies so, wie ich vermute der Fall ist, hätte dann jemand eine Idee, wie ich die regex so anpassen könnte, dass ssh, sshd und ssh2 am ende möglich sind?
kann natürlich auch sein, dass \d Platzhalter für eine beliebige Zahl ist <-- da muss ich mich einmal reinarbeiten
hab ich gemacht, hier die Ausgabe:
Running tests
=============
Use regex file : /etc/fail2ban/filter.d/sshd.conf
Use log file : /var/log/auth.log
Results
=======
Failregex
|- Regular expressions:
| [1] ^\s*(?:\S+ )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?sshd(?:\(\S+\))? [\]\)]?:?|[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:)?\s*(?:error: PAM: )?Aut hentication failure for .* from <HOST>\s*$
| [2] ^\s*(?:\S+ )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?sshd(?:\(\S+\))? [\]\)]?:?|[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:)?\s*(?:error: PAM: )?Use r not known to the underlying authentication module for .* from <HOST>\s*$
| [3] ^\s*(?:\S+ )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?sshd(?:\(\S+\))? [\]\)]?:?|[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:)?\s*Failed (?:password|p ublickey) for .* from <HOST>(?: port \d*)?(?: ssh\d*)?$
| [4] ^\s*(?:\S+ )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?sshd(?:\(\S+\))? [\]\)]?:?|[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:)?\s*ROOT LOGIN REFUSED.* FROM <HOST>\s*$
| [5] ^\s*(?:\S+ )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?sshd(?:\(\S+\))? [\]\)]?:?|[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:)?\s*[iI](?:llegal|nvalid ) user .* from <HOST>\s*$
| [6] ^\s*(?:\S+ )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?sshd(?:\(\S+\))? [\]\)]?:?|[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:)?\s*User .+ from <HOST> not allowed because not listed in AllowUsers$
| [7] ^\s*(?:\S+ )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?sshd(?:\(\S+\))? [\]\)]?:?|[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:)?\s*authentication failu re; logname=\S* uid=\S* euid=\S* tty=\S* ruser=\S* rhost=<HOST>(?:\s+user=.*)?\s *$
| [8] ^\s*(?:\S+ )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?sshd(?:\(\S+\))? [\]\)]?:?|[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:)?\s*refused connect from \S+ \(<HOST>\)\s*$
| [9] ^\s*(?:\S+ )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?sshd(?:\(\S+\))? [\]\)]?:?|[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:)?\s*Address <HOST> .* PO SSIBLE BREAK-IN ATTEMPT!*\s*$
| [10] ^\s*(?:\S+ )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?sshd(?:\(\S+\)) ?[\]\)]?:?|[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:)?\s*User .+ from <HOST> not allowed because none of user's groups are listed in AllowGroups\s*$
|
`- Number of matches:
[1] 0 match(es)
[2] 0 match(es)
[3] 81 match(es)
[4] 0 match(es)
[5] 22 match(es)
[6] 0 match(es)
[7] 0 match(es)
[8] 0 match(es)
[9] 0 match(es)
[10] 0 match(es)
Ignoreregex
|- Regular expressions:
|
`- Number of matches:
Summary
=======
Addresses found:
[1]
[2]
[3]
188.65.81.41 (Mon Aug 22 12:59:30 2011)
188.65.81.41 (Mon Aug 22 12:59:42 2011)
218.206.31.138 (Mon Aug 22 23:42:54 2011)
218.206.31.138 (Mon Aug 22 23:42:59 2011)
218.206.31.138 (Mon Aug 22 23:43:04 2011)
218.206.31.138 (Mon Aug 22 23:43:09 2011)
218.206.31.138 (Mon Aug 22 23:43:13 2011)
218.206.31.138 (Mon Aug 22 23:43:18 2011)
218.206.31.138 (Mon Aug 22 23:43:23 2011)
218.206.31.138 (Mon Aug 22 23:43:28 2011)
218.206.31.138 (Mon Aug 22 23:43:32 2011)
218.206.31.138 (Mon Aug 22 23:43:37 2011)
218.206.31.138 (Mon Aug 22 23:43:42 2011)
218.206.31.138 (Mon Aug 22 23:43:47 2011)
218.206.31.138 (Mon Aug 22 23:43:51 2011)
218.206.31.138 (Mon Aug 22 23:43:57 2011)
218.206.31.138 (Mon Aug 22 23:44:02 2011)
218.206.31.138 (Mon Aug 22 23:44:07 2011)
218.206.31.138 (Mon Aug 22 23:44:12 2011)
218.206.31.138 (Mon Aug 22 23:44:17 2011)
218.206.31.138 (Mon Aug 22 23:44:21 2011)
218.206.31.138 (Mon Aug 22 23:44:26 2011)
218.206.31.138 (Mon Aug 22 23:44:31 2011)
218.206.31.138 (Mon Aug 22 23:44:36 2011)
218.206.31.138 (Mon Aug 22 23:44:41 2011)
218.206.31.138 (Mon Aug 22 23:44:45 2011)
218.206.31.138 (Mon Aug 22 23:44:51 2011)
218.206.31.138 (Mon Aug 22 23:44:56 2011)
218.206.31.138 (Mon Aug 22 23:45:01 2011)
218.206.31.138 (Mon Aug 22 23:45:05 2011)
218.206.31.138 (Mon Aug 22 23:45:10 2011)
218.206.31.138 (Mon Aug 22 23:45:15 2011)
218.206.31.138 (Mon Aug 22 23:45:20 2011)
218.206.31.138 (Mon Aug 22 23:45:25 2011)
218.206.31.138 (Mon Aug 22 23:45:30 2011)
218.206.31.138 (Mon Aug 22 23:45:35 2011)
218.206.31.138 (Mon Aug 22 23:45:40 2011)
218.206.31.138 (Mon Aug 22 23:45:45 2011)
218.206.31.138 (Mon Aug 22 23:45:50 2011)
218.206.31.138 (Mon Aug 22 23:45:55 2011)
218.206.31.138 (Mon Aug 22 23:46:00 2011)
218.206.31.138 (Mon Aug 22 23:46:05 2011)
218.206.31.138 (Mon Aug 22 23:46:10 2011)
218.206.31.138 (Mon Aug 22 23:46:16 2011)
218.206.31.138 (Mon Aug 22 23:46:21 2011)
218.206.31.138 (Mon Aug 22 23:46:26 2011)
218.206.31.138 (Mon Aug 22 23:46:32 2011)
218.206.31.138 (Mon Aug 22 23:46:37 2011)
218.206.31.138 (Mon Aug 22 23:46:42 2011)
218.206.31.138 (Mon Aug 22 23:46:46 2011)
218.206.31.138 (Mon Aug 22 23:46:52 2011)
218.206.31.138 (Mon Aug 22 23:46:57 2011)
218.206.31.138 (Mon Aug 22 23:47:02 2011)
218.206.31.138 (Mon Aug 22 23:47:07 2011)
218.206.31.138 (Mon Aug 22 23:47:12 2011)
218.206.31.138 (Mon Aug 22 23:47:17 2011)
218.206.31.138 (Mon Aug 22 23:47:21 2011)
218.206.31.138 (Mon Aug 22 23:47:26 2011)
218.206.31.138 (Mon Aug 22 23:47:31 2011)
218.206.31.138 (Mon Aug 22 23:47:36 2011)
218.206.31.138 (Mon Aug 22 23:47:40 2011)
218.206.31.138 (Mon Aug 22 23:47:45 2011)
218.206.31.138 (Mon Aug 22 23:47:50 2011)
218.206.31.138 (Mon Aug 22 23:47:55 2011)
218.206.31.138 (Mon Aug 22 23:48:01 2011)
218.206.31.138 (Mon Aug 22 23:48:05 2011)
218.206.31.138 (Mon Aug 22 23:48:10 2011)
218.206.31.138 (Mon Aug 22 23:48:15 2011)
218.206.31.138 (Mon Aug 22 23:48:20 2011)
218.206.31.138 (Mon Aug 22 23:48:25 2011)
218.206.31.138 (Mon Aug 22 23:48:29 2011)
218.206.31.138 (Mon Aug 22 23:48:34 2011)
218.206.31.138 (Mon Aug 22 23:48:39 2011)
218.206.31.138 (Mon Aug 22 23:48:44 2011)
218.206.31.138 (Mon Aug 22 23:48:49 2011)
218.206.31.138 (Mon Aug 22 23:48:53 2011)
218.206.31.138 (Mon Aug 22 23:48:58 2011)
218.206.31.138 (Mon Aug 22 23:49:02 2011)
188.194.80.148 (Tue Aug 23 08:55:03 2011)
213.218.23.154 (Wed Aug 24 11:57:27 2011)
213.218.23.154 (Wed Aug 24 11:58:23 2011)
[4]
[5]
188.65.81.41 (Mon Aug 22 12:59:40 2011)
218.206.31.138 (Mon Aug 22 23:45:23 2011)
218.206.31.138 (Mon Aug 22 23:45:28 2011)
218.206.31.138 (Mon Aug 22 23:46:14 2011)
218.206.31.138 (Mon Aug 22 23:46:19 2011)
218.206.31.138 (Mon Aug 22 23:46:24 2011)
218.206.31.138 (Mon Aug 22 23:46:45 2011)
218.206.31.138 (Mon Aug 22 23:46:49 2011)
218.206.31.138 (Mon Aug 22 23:46:54 2011)
218.206.31.138 (Mon Aug 22 23:47:00 2011)
218.206.31.138 (Mon Aug 22 23:47:05 2011)
218.206.31.138 (Mon Aug 22 23:47:43 2011)
218.206.31.138 (Mon Aug 22 23:47:48 2011)
218.206.31.138 (Mon Aug 22 23:47:53 2011)
218.206.31.138 (Mon Aug 22 23:48:27 2011)
218.206.31.138 (Mon Aug 22 23:48:32 2011)
218.206.31.138 (Mon Aug 22 23:48:37 2011)
218.206.31.138 (Mon Aug 22 23:48:42 2011)
218.206.31.138 (Mon Aug 22 23:48:47 2011)
218.206.31.138 (Mon Aug 22 23:48:52 2011)
218.206.31.138 (Mon Aug 22 23:48:56 2011)
218.206.31.138 (Mon Aug 22 23:49:01 2011)
[6]
[7]
[8]
[9]
[10]
Date template hits:
5653 hit(s): MONTH Day Hour:Minute:Second
0 hit(s): WEEKDAY MONTH Day Hour:Minute:Second Year
0 hit(s): WEEKDAY MONTH Day Hour:Minute:Second
0 hit(s): Year/Month/Day Hour:Minute:Second
0 hit(s): Day/Month/Year Hour:Minute:Second
0 hit(s): Day/Month/Year Hour:Minute:Second
0 hit(s): Day/MONTH/Year:Hour:Minute:Second
0 hit(s): Month/Day/Year:Hour:Minute:Second
0 hit(s): Year-Month-Day Hour:Minute:Second
0 hit(s): Day-MONTH-Year Hour:Minute:Second[.Millisecond]
0 hit(s): Day-Month-Year Hour:Minute:Second
0 hit(s): TAI64N
0 hit(s): Epoch
0 hit(s): ISO 8601
0 hit(s): Hour:Minute:Second
0 hit(s): <Month/Day/Year@Hour:Minute:Second>
Success, the total number of match is 103
However, look at the above section 'Running tests' which could contain important
information.
Alles anzeigen
Okay, das bedeutet, dass die Regeln matchen. Sieht man hier:
ZitatAlles anzeigen
[1] 0 match(es)
[2] 0 match(es)
[3] 81 match(es)
[4] 0 match(es)
[5] 22 match(es)
[6] 0 match(es)
[7] 0 match(es)
[8] 0 match(es)
[9] 0 match(es)
[10] 0 match(es)
Warum jetzt allerdings trotzdem keine Action ausgeführt wird ist mir dann ehrlich gesagt schleierhaft. Das scheint weniger das Script von n-durch-x als eher fail2ban selbst zu betreffen.
Ich selbst habe leider kein Ubuntu am laufen, kanns also leider auch nicht testen.
Evtl. ist jemand mit etwas mehr fail2ban-Erfahrung hier im Forum...
Sorry aber trotzdem viel Erfolg bei der Fehlersuche!
danke dir trotzdem.
Jedenfalls wissen wir nun schoneinmal etwas mehr!
auch dir viel Erfolg weiterhin. Ich werde jedenfalls nicht aufgeben und insgeheim weiter auf Antworten anderer hoffen.
Ich hab grad meinen Testserver Ubuntu 10.04LTS installiert um zu testen woran es liegen könnte... Nur leider hats funktioniert...
Da ich keine Erfahrung mit Ubuntu habe und fail2ban beim testen mit meinem Script funktioniert hat, kann ich dir leider nicht weiter helfen als narayan es schon getan hat.
Ich kann höchstens noch die Vermutung äußern, dass es irgendwo an den Dateirechten hakt... ansonsten Wünsche ich dir noch viel Glück bei der Fehlersuche und wenns nicht klappt... ich empfehle Debian
Vielleicht könntest mir einmal die Dateirechte von dir durchgeben für die sync.conf und die sync.sh soewie den ordner, in dem die liegen!!
danke schonmal.
Wenn ich auf dateirechtlichem wege nichts finde, dann werde ich das ganze system eben noch einmal neu aufsetzen so schwer kann das ja nicht sein
hallo,
habe ein kleines problemchen mit f2b .. und zwar werden irgendwie die fehlerhaften sasl-logins nicht ausgewertet bzw. geblockt. in der mail.log steht dann sowas wie:
[zitat]
Aug 19 10:01:35 static postfix/smtpd[18026]: warning: 163.121.237.202: hostname host-163.121.237.202.tedata.net verification failed: Name or service not known
Aug 19 10:01:35 static postfix/smtpd[18026]: connect from unknown[163.121.237.202]
Aug 19 10:01:36 static postfix/smtpd[18026]: warning: SASL authentication failure: need authentication name
Aug 19 10:01:36 static postfix/smtpd[18026]: warning: unknown[163.121.237.202]: SASL CRAM-MD5 authentication failed: bad protocol / cancel
Aug 19 10:01:37 static postfix/smtpd[18026]: warning: SASL authentication failure: need authentication name
[/zitat]
habe eigentlich in der jail.conf den sasl-filter aktiviert und in der sasl.conf folgendes stehen:
failregex = (?i): warning: [-._\w]+\[<HOST>\]: SASL (?:LOGIN|PLAIN|(?:CRAM|DIGEST)-MD5) authentication failed(: [A-Za-z0-9+/]*={0,2})?$
wo ist da das problem!?? & wie ist das bei euch? sonst ist alles ok, nur der spass funzt nicht.
danke schonmal fuer nen tipps.
jkn