fail2ban won't start. help would be appreciated

i got freepbx 2.8
i just installed fail2 ban but when i run the fail to ban command this happens.
any linux gurus can provide insight on what went wrong?
here’s the log file.

[[email protected] filter.d]# /etc/init.d/fail2ban start
Starting fail2ban: Traceback (most recent call last):
File “/usr/bin/fail2ban-client”, line 401, in ?
if client.start(sys.argv):
File “/usr/bin/fail2ban-client”, line 370, in start
return self.__processCommand(args)
File “/usr/bin/fail2ban-client”, line 180, in __processCommand
ret = self.__readConfig()
File “/usr/bin/fail2ban-client”, line 375, in __readConfig
ret = self.__configurator.getOptions()
File “/usr/share/fail2ban/client/”, line 65, in getOptions
return self.__jails.getOptions(jail)
File “/usr/share/fail2ban/client/”, line 64, in getOptions
ret = jail.getOptions()
File “/usr/share/fail2ban/client/”, line 75, in getOptions
ret =
File “/usr/share/fail2ban/client/”, line 53, in read
return, “filter.d/” + self.__file)
File “/usr/share/fail2ban/client/”, line 59, in read, [bConf, bLocal])
File “/usr/share/fail2ban/client/”, line 105, in read
fileNamesFull += SafeConfigParserWithIncludes.getIncludes(filename)
File “/usr/share/fail2ban/client/”, line 76, in getIncludes
File “/usr/lib/python2.4/”, line 267, in read
self._read(fp, filename)
File “/usr/lib/python2.4/”, line 490, in _read
raise e
ConfigParser.ParsingError: File contains parsing errors: /etc/fail2ban/filter.d/asterisk.conf
[line 10]: ‘from\n’
[line 21]: ‘The\n’
[line 23]: ‘"" can\n’
[line 25]: ‘alias for\n’
[line 31]: ‘Wrong password\n’
[line 33]: ‘matching peer found\n’
[line 35]: ‘Username/auth name mismatch\n’
[line 37]: ‘Device does not match ACL\n’
[line 41]: ‘(.*)\n’
[[email protected] filter.d]#

heres the asterisk.conf file.

Fail2Ban configuration file

$Revision: 250 $


Read common prefixes. If any customizations available – read them from


#before = common.conf


#_daemon = asterisk

Option: failregex

Notes.: regex to match the password failures messages in the logfile. The

host must be matched by a group named “host”. The tag “” can

be used for standard IP/hostname matching and is only an alias for


Values: TEXT

failregex = NOTICE.* .: Registration from '.’ failed for ‘’ - Wrong password
NOTICE.* .: Registration from '.’ failed for ‘’ - No matching peer found
NOTICE.* .: Registration from '.’ failed for ‘’ - Username/auth name mismatch
NOTICE.* .: Registration from '.’ failed for ‘’ - Device does not match ACL
NOTICE.* failed to authenticate as ‘.’$
.: No registration for peer '.’ (from )
NOTICE.* .: Host failed MD5 authentication for '.’ (.)
.: Failed to authenticate user .@.*

Option: ignoreregex

Notes.: regex to ignore. If this regex matches, the line is ignored.

Values: TEXT

ignoreregex =

any help would be appreciated. thanks!

nvm i fixed it by removing the asterisk.conf file
then running this command fail2ban-server -x

tested ok

Removing asterisk.conf? From /etc/asterisk? That would break Asterisk and FreePBX.

BTW, this is the FreePBX forum, why would you ask this question here?