Page 1 of 1

Fail2ban not working

PostPosted: Mon Apr 14, 2014 4:18 am
by DefLeppard
I am using Vicibox 5.0.3 Preload x64 instance. Vicidial 2.8b0.5, SVN version 2040.
VERSION: 2.8-417a
BUILD: 131019-0849

I have installed fail2ban and added a jail called asterisk-iptables but it doesn't seem to work. It seems that there is no service /etc/init.d/fail2ban. There is a command called fail2ban-server which when run shows the following:
2014-04-14 04:47:07,342 fail2ban.server [12704]: INFO Starting Fail2ban v0.8.12
2014-04-14 04:47:07,342 fail2ban.server [12704]: INFO Starting in daemon mode

But there are no rules added in iptables. I tried to test using a soft phone with incorrect credentials and my IP was not banned. Following is my jail config. I am using stock filter.d/asterisk.conf
[asterisk-iptables]
# if more than 4 attempts are made within 6 hours, ban for 24 hours
enabled = true
filter = asterisk
action = iptables-allports[name=ASTERISK, protocol=all]
sendmail[name=ASTERISK, dest=xxx@gmail.com,
sender=fail2ban@xyz.abc.com]
logpath = /var/log/asterisk/messages
maxretry = 4
findtime = 21600
bantime = 86400

Please advise how I can get Fail2ban working.

Re: Fail2ban not working

PostPosted: Wed Apr 16, 2014 11:40 pm
by williamconley
My advice: DON'T get it working.

http://www.viciwiki.com/index.php/DGG

Re: Fail2ban not working

PostPosted: Wed Apr 16, 2014 11:46 pm
by DefLeppard
Good post. But how do I allow at-home agents to access the public dialer without having to whitelist their IP each time? In some cases, multiple times a day.

Re: Fail2ban not working

PostPosted: Thu Apr 17, 2014 5:10 pm
by williamconley
Apparently you didn't notice what the DYNAMIC portion of DGG (aka: DYNAMIC good guys) is for. Perhaps you should try again? :)