From 7aad6685aff32112ec69e739191633ae8d15edce Mon Sep 17 00:00:00 2001 From: Arturo 'Buanzo' Busleiman Date: Thu, 4 Mar 2010 17:15:12 +0000 Subject: [PATCH 1/2] added time module. bug reported in buanzo's blog at http://blogs.buanzo.com.ar/2009/04/fail2ban-patch-ban-ip-address-manually.html git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_8@758 a942ae1a-1317-0410-a47c-b1dcaea8d605 --- server/filter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/filter.py b/server/filter.py index 52a99e28..ef18519c 100644 --- a/server/filter.py +++ b/server/filter.py @@ -31,7 +31,7 @@ from datedetector import DateDetector from mytime import MyTime from failregex import FailRegex, Regex, RegexException -import logging, re, os, fcntl +import logging, re, os, fcntl, time # Gets the instance of the logger. logSys = logging.getLogger("fail2ban.filter") From dabe3aeae1deb814940d574dadfebd801eb3dc99 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 29 Jun 2010 01:34:08 +0000 Subject: [PATCH 2/2] disabling entirely named-refused-udp jail with a big fat warning git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_8@761 a942ae1a-1317-0410-a47c-b1dcaea8d605 --- config/jail.conf | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/config/jail.conf b/config/jail.conf index 8d5f66e6..41a56ffd 100644 --- a/config/jail.conf +++ b/config/jail.conf @@ -211,14 +211,22 @@ ignoreip = 168.192.0.1 # in your named.conf to provide proper logging. # This jail blocks UDP traffic for DNS requests. -[named-refused-udp] - -enabled = false -filter = named-refused -action = iptables-multiport[name=Named, port="domain,953", protocol=udp] - sendmail-whois[name=Named, dest=you@mail.com] -logpath = /var/log/named/security.log -ignoreip = 168.192.0.1 +# !!! WARNING !!! +# Since UDP is connectionless protocol, spoofing of IP and immitation +# of illegal actions is way too simple. Thus enabling of this filter +# might provide an easy way for implementing a DoS against a chosen +# victim. See +# http://nion.modprobe.de/blog/archives/690-fail2ban-+-dns-fail.html +# Please DO NOT USE this jail unless you know what you are doing. +# +# [named-refused-udp] +# +# enabled = false +# filter = named-refused +# action = iptables-multiport[name=Named, port="domain,953", protocol=udp] +# sendmail-whois[name=Named, dest=you@mail.com] +# logpath = /var/log/named/security.log +# ignoreip = 168.192.0.1 # This jail blocks TCP traffic for DNS requests.