4 ms·
How do you configure emails on successful logins? Can you share your config, sufficiently anonymized?
by phanimahesh 3y ago
How do you configure emails on successful logins? Can you share your config, sufficiently anonymized?
- elesiuta 3y agoI created a jail for fail2ban with logpath = /var/log/auth.log and for the filter I use failregex = .*Connection closed by authenticating user [a-z_]([a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}\$) <HOST> port [0-9]* \[preauth\] and the emails are just cron with a python script that checks /var/log/fail2ban.log for any new Found|Ban|Unban IPs and sends them using smtplib If you like I can share the full config files but the rest isn't too interesting nor different from what is here https://www.fail2ban.org/wiki/index.php/MANUAL_0_8#Jails https://www.fail2ban.org/wiki/index.php/MANUAL_0_8#Jails