Merge pull request #1226 from pablorf-dev/master

Minor fix and enhancement (fake google domains)
pull/1179/merge
Serg G. Brester 2015-10-22 14:23:47 +02:00
commit 26517b0464
3 changed files with 5 additions and 2 deletions

View File

@ -21,6 +21,7 @@ ver. 0.9.4 (2015/XX/XXX) - wanna-be-released
* Treat failed and killed execution of commands identically (only * Treat failed and killed execution of commands identically (only
different log messages), which addresses different behavior on different different log messages), which addresses different behavior on different
exit codes of dash and bash (gh-1155) exit codes of dash and bash (gh-1155)
* Fix jail.conf.5 man's section (gh-1226)
- New Features: - New Features:
@ -34,6 +35,8 @@ ver. 0.9.4 (2015/XX/XXX) - wanna-be-released
(Thanks M. Maraun) (Thanks M. Maraun)
* Added check against atacker's Googlebot PTR fake records * Added check against atacker's Googlebot PTR fake records
(Thanks Pablo Rodriguez Fernandez) (Thanks Pablo Rodriguez Fernandez)
* Enhance filter against atacker's Googlebot PTR fake records
(gh-1226)
ver. 0.9.3 (2015/08/01) - lets-all-stay-friends ver. 0.9.3 (2015/08/01) - lets-all-stay-friends
---------- ----------

View File

@ -26,7 +26,7 @@ def is_googlebot(ip):
from fail2ban.server.filter import DNSUtils from fail2ban.server.filter import DNSUtils
host = DNSUtils.ipToName(ip) host = DNSUtils.ipToName(ip)
if not host or not re.match('crawl-.*\.googlebot\.com', host): if not host or not re.match('.*\.google(bot)?\.com$', host):
sys.exit(1) sys.exit(1)
host_ips = DNSUtils.dnsToIp(host) host_ips = DNSUtils.dnsToIp(host)
sys.exit(0 if ip in host_ips else 1) sys.exit(0 if ip in host_ips else 1)

View File

@ -1,4 +1,4 @@
.TH JAIL.CONF "10" "October 2013" "Fail2Ban" "Fail2Ban Configuration" .TH JAIL.CONF "5" "October 2013" "Fail2Ban" "Fail2Ban Configuration"
.SH NAME .SH NAME
jail.conf \- configuration for the fail2ban server jail.conf \- configuration for the fail2ban server
.SH SYNOPSIS .SH SYNOPSIS