[asterisk-users] file2ban

arcopix at erihon.com arcopix at erihon.com
Tue Jul 26 14:35:30 CDT 2011


Hello,

That is relatively easy :)

fail2ban is actually executing a command. Check out the actions configs
that are stored in your fail2ban directory. E.g:
> ls -1 /etc/fail2ban/action.d/ 

You can write your own script (bash/php/perl/C/you name it) that inputs
the information in the DB or attempt to use something like:
> echo "INSERT INTO ban_addresses VALUES ('<ip>');" | mysql -u someuser -p'somepass'
However I am not sure if this solution will work under fail2ban
(forwarding output to another app via pipe)

Regards,
Stefan Lekov


On Tue, 26 Jul 2011 15:21:39 -0400, "Bryant Zimmerman"
<BryantZ at zktech.com> wrote:
> I want to add an entry to a database every time a brute force
> registration attempt is done.
>  from this database we are updating cisco routers with our ban list so
> our entire network is protected.
>  The database side of things is working and has been for some time. I
> really would like to add the file2ban side of it to protect our
> asterisk system better.
> 
>  How would I best go about doing this using file2ban with asterisk?
>  Any feed back is appreciated. 
> 
> Thanks
>  zktech




More information about the asterisk-users mailing list