Re: Immer wieder Fail2ban :?
Posted: Tue 25. Jun 2024, 09:31
Wie sieht deine /etc/fail2ban/filter.d/postfix.conf aus?
Das offizielle KeyHelp Forum der Keyweb AG / The official KeyHelp forum of Keyweb AG
https://community.keyhelp.de/
Läuft Fail2ban denn auch und wurden bereits fail logins banned?technotravel wrote: ↑Mon 24. Jun 2024, 19:36 Das Jail ist bei mir aktiviert, trotzdem werde ich geflutet von... und dergleichen ... etwa im Sekundentakt ...Code: Select all
Warning: unknown 194.169.175.66]: SASL LOGIN authentication failed: UGFzc3dvcmQ6, sasl_username=adm@meinevserver.de]
Code: Select all
systemctl status fail2ban
grep kh-postfix-sasl /var/log/fail2ban.log
Code: Select all
nano /etc/fail2ban/filter.d/postfix-sasl.conf
# Fail2Ban filter for postfix
#
[INCLUDES]
before = common.conf
[Definition]
_daemon = postfix(-\w+)?/(?:submission/|smtps/)?smtp[ds]
failregex = ^(.*)\[<HOST>\]: SASL (?:LOGIN|PLAIN) authentication failed:(.*)$
ignoreregex = authentication failed: Connection lost to authentication server$
[Init]
journalmatch = _SYSTEMD_UNIT=postfix@-.service
Code: Select all
nano /etc/fail2ban/jail.d/postfix-sasl.local
[postfix-sasl]
enabled = true
port = smtp,ssmtp,smtps,submission,pop3,pop3s,imap,imaps
filter = postfix-sasl
backend = systemd
maxretry = 1
findtime = 1800
bantime = 1800
Code: Select all
# Regex Test:
fail2ban-regex systemd-journal /etc/fail2ban/filter.d/postfix-sasl.conf
# F2B log file check
grep postfix-sasl /var/log/fail2ban.log
Danke Alex - genau das war mein Fehler