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.
[root@hqvp1 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/configurator.py”, line 65, in getOptions
return self.__jails.getOptions(jail)
File “/usr/share/fail2ban/client/jailsreader.py”, line 64, in getOptions
ret = jail.getOptions()
File “/usr/share/fail2ban/client/jailreader.py”, line 75, in getOptions
ret = self.__filter.read()
File “/usr/share/fail2ban/client/filterreader.py”, line 53, in read
return ConfigReader.read(self, “filter.d/” + self.__file)
File “/usr/share/fail2ban/client/configreader.py”, line 59, in read
SafeConfigParserWithIncludes.read(self, [bConf, bLocal])
File “/usr/share/fail2ban/client/configparserinc.py”, line 105, in read
fileNamesFull += SafeConfigParserWithIncludes.getIncludes(filename)
File “/usr/share/fail2ban/client/configparserinc.py”, line 76, in getIncludes
parser.read(resource)
File “/usr/lib/python2.4/ConfigParser.py”, line 267, in read
self._read(fp, filename)
File “/usr/lib/python2.4/ConfigParser.py”, 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’
[FAILED]
[root@hqvp1 filter.d]#
heres the asterisk.conf file.
Fail2Ban configuration file
$Revision: 250 $
[INCLUDES]
Read common prefixes. If any customizations available – read them from
common.local
#before = common.conf
[Definition]
#_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
(?:::f{4,6}:)?(?P\S+)
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 ‘.’$
NOTICE. .: No registration for peer '.’ (from )
NOTICE.* .: Host failed MD5 authentication for '.’ (.)
NOTICE. .: 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!