Package: fail2ban
Version: 0.9.2-1
Severity: normal
Dear Maintainer,
apache-fakegooglebot requires:
#!/usr/bin/python3
in order to run when /usr/bin/python points to pyton2 on a system.
Without this, I see the following errors in the log:
2015-06-11 07:19:37,167 fail2ban.action [18680]: ERROR
/etc/fail2ban/filter.d/ignorecommands/apache-fakegooglebot 66.249.64.52 --
stdout: b''
2015-06-11 07:19:37,270 fail2ban.action [18680]: ERROR
/etc/fail2ban/filter.d/ignorecommands/apache-fakegooglebot 66.249.64.52 --
stderr: b'Traceback (most recent call last):\n File
"/etc/fail2ban/filter.d/ignorecommands/apache-fakegooglebot", line 32, in
<module>\n is_googlebot(process_args(sys.argv))\n File
"/etc/fail2ban/filter.d/ignorecommands/apache-fakegooglebot", line 17, in
process_args\n from fail2ban.server.filter import DNSUtils\nImportError: No
module named fail2ban.server.filter\n'
2015-06-11 07:19:37,473 fail2ban.action [18680]: ERROR
/etc/fail2ban/filter.d/ignorecommands/apache-fakegooglebot 66.249.64.52 --
returned 1
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (1000, 'testing'), (750, 'testing'), (50, 'unstable'), (1,
'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 4.0.4-x86_64-linode57 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages fail2ban depends on:
ii init-system-helpers 1.23
ii lsb-base 4.1+Debian13+nmu1
ii python3 3.4.2-2
pn python3:any <none>
Versions of packages fail2ban recommends:
ii iptables 1.4.21-2+b1
ii python 2.7.9-1
ii python3-pyinotify 0.9.5-1
ii python3-systemd 215-18
ii whois 5.2.8
Versions of packages fail2ban suggests:
ii mailutils [mailx] 1:2.99.98-2
pn monit <none>
ii rsyslog [system-log-daemon] 8.9.0-3
-- Configuration Files:
/etc/fail2ban/filter.d/ignorecommands/apache-fakegooglebot changed:
import sys
def process_args(argv):
if len(argv) != 2:
sys.stderr.write("Please provide a single IP as an argument. Got: %s\n"
% (argv[1:]))
sys.exit(2)
ip = argv[1]
from fail2ban.server.filter import DNSUtils
if not DNSUtils.isValidIP(ip):
sys.stderr.write("Argument must be a single valid IP. Got: %s\n"
% ip)
sys.exit(3)
return ip
def is_googlebot(ip):
import re
from fail2ban.server.filter import DNSUtils
host = DNSUtils.ipToName(ip)
sys.exit(0 if (host and re.match('crawl-.*\.googlebot\.com', host)) else 1)
if __name__ == '__main__':
is_googlebot(process_args(sys.argv))
/etc/fail2ban/paths-debian.conf changed:
[INCLUDES]
before = paths-common.conf
after = paths-overrides.local
[DEFAULT]
syslog_mail = /var/log/mail.log
syslog_mail_warn = /var/log/mail.warn
syslog_authpriv = /var/log/auth.log
syslog_user = /var/log/user.log
syslog_ftp = /var/log/syslog
syslog_daemon = /var/log/daemon.log
syslog_local0 = /var/log/messages
apache_error_log = /var/log/apache2/*error.log
/home/www/*/log/error_log
apache_access_log = /var/log/apache2/*access.log
/home/www/*/log/access_log
exim_main_log = /var/log/exim4/mainlog
proftpd_log = /var/log/proftpd/proftpd.log
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]