Hello,

On Tue, 24 Apr 2018, Josu Lazkano wrote:
Hello,

I have installed fail2ban in all of my Debian servers, it really works well.

But now I want to use it not to ban, just for notify. I want to notify
every wireless device that connect to my AP:

# cat /var/log/ap-home.log | grep AP-STA-CONNECTED
Apr 24 21:40:58 ap-home hostapd: wlan0: AP-STA-CONNECTED AA:AA:AA:AA:AA:AA
Apr 24 21:41:39 ap-home hostapd: wlan1: AP-STA-CONNECTED BB:BB:BB:BB:BB:BB
Apr 24 21:58:07 ap-home hostapd: wlan0: AP-STA-CONNECTED CC:CC:CC:CC:CC:CC

I want to receive one mail for every wifi device connect to my AP.

Fail2Ban is a bit limited in its pattern matching, but once you _do_ match the needed lines, there are pretty much no limits to what you can do :-)

You can have a look at this article I wrote, for a showcase of how adaptable Fail2Ban is:
http://yalis.fr/cms/index.php/post/2014/11/02/Migrate-from-DenyHosts-to-Fail2ban

In short, for your need, I would write my own action file, taking as a starting point an action that does ban+mail, and I would remove the ban part.

Or you could use Pyruse:
https://yalis.fr/git/yves/pyruse

[Disclaimer: I am the author of Pyruse]

Cheers,

Yves.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Fail2ban-users mailing list
Fail2ban-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fail2ban-users

Reply via email to