Fail2ban Filter ohne Wirkung

Einrichten des lokalen Netzes, Verbindung zu anderen Computern und Diensten.
Antworten
techcom
Beiträge: 7
Registriert: 14.04.2017 18:46:25

Fail2ban Filter ohne Wirkung

Beitrag von techcom » 24.11.2019 19:56:38

Hallo Forum,
habe ebenfalls obiges Problem, allerdings mit dem dovecot Jail.

System:
Linux 10 (buster)
Kernel: Linux 4.19.66-v7l+
Fail2Ban v0.10.2
iptables v1.8.2 (nf_tables)

hier meine configs:

jail.local
[nginx-400]
enabled = true
filter = nginx-400
port = http,https
banaction = iptables-multiport
bantime = -1
maxretry = 3
logpath = /var/log/nginx/access.log


[dovecot]
enabled = true
filter = dovecot
port = imap,imaps
banaction = iptables-multiport
logpath = /var/log/mail.log
bantime = -1
maxretry = 6
findtime = 86400
dovecot.conf
[Definition]

failregex = imap-login: Disconnected? \(((no auth attempts)( in \d+ secs)?)\):( user=<\S*>,)? rip=<HOST>
der Befehl:
fail2ban-regex /var/log/mail.log /etc/fail2ban/filter.d/dovecot.conf
liefert auch die korrekte Anzahl an Treffern der angreifenden Hosts in der mail.log.
In der fail2ban.log werden diese Hosts auch unter 'Found' gelistet.
Allerdings finde ich in keinen Eintrag unter 'Ban' wie beim ngingx-400 Jail.

Der Befehl
iptables -L -n -v
zeigt, dass die Chain f2b-dovecot nicht existiert
Chain INPUT (policy ACCEPT 64188 packets, 7398K bytes)
pkts bytes target prot opt in out source destination
694 45467 f2b-nginx-400 tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 47670 packets, 11M bytes)
pkts bytes target prot opt in out source destination

Chain f2b-nginx-400 (1 references)
pkts bytes target prot opt in out source destination
0 0 REJECT all -- * * 54.38.207.237 0.0.0.0/0 reject-with icmp-port-unreachable
0 0 REJECT all -- * * 139.99.141.237 0.0.0.0/0 reject-with icmp-port-unreachable
......
FRAGE: Wo habe ich hier etwas falsch gemacht, bzw. welcher Prozess ist dafür verantwortlich, dass die Chain f2b-dovecot korrekt angelegt wird?

Bin dankbar für jede Hilfe!!!
Zuletzt geändert von TRex am 24.11.2019 20:27:33, insgesamt 1-mal geändert.
Grund: abgetrennt von https://debianforum.de/forum/viewtopic.php?f=30&t=170874

techcom
Beiträge: 7
Registriert: 14.04.2017 18:46:25

Re: Fail2ban Filter ohne Wirkung

Beitrag von techcom » 25.11.2019 09:23:36

@TRex

VIELEN DANK!!!

Antworten