Acabei de instalar o fail2ban na minha máquina debian7, mas sempre que o inicio recebo muitos erros que parecem ser sobre python?
[....] Restarting authentication failure monitor: fail2banTraceback (most recent call last):
File "/usr/bin/fail2ban-client", line 404, in <module>
if client.start(sys.argv):
File "/usr/bin/fail2ban-client", line 373, in start
return self.__processCommand(args)
File "/usr/bin/fail2ban-client", line 183, in __processCommand
ret = self.__readConfig()
File "/usr/bin/fail2ban-client", line 378, in __readConfig
ret = self.__configurator.getOptions()
File "/usr/share/fail2ban/client/configurator.py", line 68, in getOptions
return self.__jails.getOptions(jail)
File "/usr/share/fail2ban/client/jailsreader.py", line 67, in getOptions
ret = jail.getOptions()
File "/usr/share/fail2ban/client/jailreader.py", line 73, in getOptions
self.__opts = ConfigReader.getOptions(self, self.__name, opts)
File "/usr/share/fail2ban/client/configreader.py", line 87, in getOptions
v = self.get(sec, option[1])
File "/usr/lib/python2.7/ConfigParser.py", line 623, in get
return self._interpolate(section, option, value, d)
File "/usr/lib/python2.7/ConfigParser.py", line 691, in _interpolate
self._interpolate_some(option, L, rawval, section, vars, 1)
File "/usr/lib/python2.7/ConfigParser.py", line 723, in _interpolate_some
option, section, rest, var)
ConfigParser.InterpolationMissingOptionError: Bad value substitution:
section: [pam-generic]
option : action
key : action_mwl
rawval :
failed!
Não tenho certeza de como depurar este, pois tenho zero conhecimento com python, mas ainda presumo que seja algo que perdi durante a instalação ou algo no jail.conf. Este é o meu jail.conf:
[DEFAULT]
ignoreip = 127.0.0.1
bantime = 18000
destemail = [email protected]
banaction = iptables-multiport
action = %(action_mwl)s
# JAILS
[ssh]
enabled = true
port = 7463
action = iptables
filter = sshd
logpath = /var/log/auth.log
maxretry = 3
[pam-generic]
enabled = true
banaction = iptables-allports
[ssh-ddos]
enabled = true
[nginx-auth]
enabled = true
filter = nginx-auth
action = iptables-multiport[name=NoAuthFailures, port="http,https"]
logpath = /var/log/nginx*/*error*.log
bantime = 600
maxretry = 6
[nginx-login]
enabled = true
filter = nginx-login
action = iptables-multiport[name=NoLoginFailures, port="http,https"]
logpath = /var/log/nginx*/*access*.log
bantime = 600
maxretry = 6
[nginx-badbots]
enabled = true
filter = apache-badbots
action = iptables-multiport[name=BadBots, port="http,https"]
logpath = /var/log/nginx*/*access*.log
bantime = 86400 # 1 day
maxretry = 1
[nginx-noscript]
enabled = true
action = iptables-multiport[name=NoScript, port="http,https"]
filter = nginx-noscript
logpath = /var/log/nginx*/*access*.log
maxretry = 6
bantime = 86400 # 1 day
Já fiz filtros para nginx-auth, nginx-login, nginx-proxy e nginx-noscript em /filters.d /
Eu também tenho o Python 2.7.3 instalado.