Fail2ban expert needed - I.P in messages

Issues related to applications and software problems
Post Reply
lightman47
Posts: 1522
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Fail2ban expert needed - I.P in messages

Post by lightman47 » 2017/07/17 15:37:56

I have a number of machines successfully running Fail2ban. Each sends me emails when they start/stop/block addresses. As a couple are laptops, I'd like Fail2ban to include the machine's I.P. address in it's startup message.

Is there a regex or 'formula' I could incorporate into my 'action' statement that would include the current I.P.?

Thank you

current 'action' statement example

Code: Select all

action   = iptables[name=VSFTPD, port = 0:65535, protocol=tcp]
           sendmail-whois[name=VSFTPD, dest=myaddress@example.com, sender=fail2ban@example.com, sendername="lnamejhp Fail2Ban"]
edit -
Investigating Pythom regex's (read somewhere that Fail2ban uses python) - am lost.

Post Reply