apache-fakegooglebot jail bans real Google bots
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
fail2ban (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
On a mostly fresh Ubuntu 16.04 server with fail2ban the apache-
$ /etc/fail2ban/
Traceback (most recent call last):
File "/etc/fail2ban/
is_
File "/etc/fail2ban/
from fail2ban.
ImportError: No module named fail2ban.
Forcing python3 gives the expected result (66.249.69.54 is a google webcrawler and should be ignored):
$ /usr/bin/python3 /etc/fail2ban/
0
Explicitly calling python3 in the shebang should solve it (distributed script backed up in .distrib):
$ diff /etc/fail2ban/
1c1
< #!/usr/bin/python
---
> #!/usr/bin/python3
A more correct fix detecting the python version used by fail2ban was committed upstream almost a year ago (apache-
Error in /var/log/
2017-08-02 13:50:16,010 fail2ban.action [1565]: ERROR /etc/fail2ban/
2017-08-02 13:50:16,010 fail2ban.action [1565]: ERROR /etc/fail2ban/
2017-08-02 13:50:16,010 fail2ban.action [1565]: ERROR /etc/fail2ban/
2017-08-02 13:50:16,010 fail2ban.filter [1565]: INFO [apache-
2017-08-02 13:50:16,770 fail2ban.actions [1565]: NOTICE [apache-
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial
$ apt-cache policy fail2ban
fail2ban:
Installed: 0.9.3-1
Candidate: 0.9.3-1
Version table:
*** 0.9.3-1 500
500 http://
500 http://
100 /var/lib/
Status changed to 'Confirmed' because the bug affects multiple users.