For my first post on this list, I'm trying to block something else than
an IP address or hostname.
I have an asterisk server, and users make phone call to international
numbers. If a user makes too many calls, I wan to block his account by
modifying a field value in a mysql database
(i.e. UPDATE field set value=0 where sip_peer_name='test').
My problem is that fail2ban does not seem to be able to get something
else than the <HOST>.
Here are my fail2ban config files :
== jail.conf ==
enabled = true
filter = asterisk-internat
action = asterisk-block-sippeer[name=asterisk-block-sippeer]
logpath = /var/log/asterisk/call_agi.log
findtime = 60
maxretry = 10
== filter.d/asterisk-internat.conf ==
failregex = FAIL2BAN-out \| Call from <SIPPEER> to .*
== action.d/asterisk-block-sippeer.conf ==
actionban = asterisk -rx "realtime update2 sippeers name <sippeer> deny
actionunban = asterisk -rx "realtime update2 sippeers name <sippeer>
Hope somebody can help me...