Permalink
Browse files

Imported Upstream version 0.8.3

  • Loading branch information...
1 parent 4404ceb commit 68e22af143249de34003860372f4f9a84de101dd @yarikoptic yarikoptic committed Jul 21, 2008
View
29 COPYING
@@ -1,3 +1,7 @@
+The following copyright applies to all files present in the Fail2ban package,
+except if a different copyright is explicitly defined in this file.
+
+
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
@@ -337,3 +341,28 @@ proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
+
+---------------------------------
+The file server/iso8601.py is licensed under the following terms.
+
+
+Copyright (c) 2007 Michael Twomey
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -4,9 +4,32 @@
|_| \__,_|_|_/___|_.__/\__,_|_||_|
=============================================================
-Fail2Ban (version 0.8.2) 2008/03/06
+Fail2Ban (version 0.8.3) 2008/07/17
=============================================================
+ver. 0.8.3 (2008/07/17) - stable
+----------
+- Process failtickets as long as failmanager is not empty.
+- Added "pam-generic" filter and more configuration fixes.
+ Thanks to Yaroslav Halchenko.
+- Fixed socket path in redhat and suse init script. Thanks to
+ Jim Wight.
+- Fixed PID file while started in daemon mode. Thanks to
+ Christian Jobic who submitted a similar patch.
+- Fixed "fail2ban-client get <jail> logpath". Bug #1916986.
+- Added gssftpd filter. Thanks to Kevin Zembower.
+- Added "Day/Month/Year Hour:Minute:Second" date template.
+ Thanks to Dennis Winter.
+- Fixed ignoreregex processing in fail2ban-client. Thanks to
+ René Berber.
+- Added ISO 8601 date/time format.
+- Added and changed some logging level and messages.
+- Added missing ignoreregex to filters. Thanks to Klaus
+ Lehmann.
+- Use poll instead of select in asyncore.loop. This should
+ solve the "Unknown error 514". Thanks to Michael Geiger and
+ Klaus Lehmann.
+
ver. 0.8.2 (2008/03/06) - stable
----------
- Fixed named filter. Thanks to Yaroslav Halchenko
View
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: fail2ban
-Version: 0.8.2
+Version: 0.8.3
Summary: Ban IPs that make too many password failure
Home-page: http://www.fail2ban.org
Author: Cyril Jaquier
View
6 README
@@ -4,7 +4,7 @@
|_| \__,_|_|_/___|_.__/\__,_|_||_|
=============================================================
-Fail2Ban (version 0.8.2) 2008/03/06
+Fail2Ban (version 0.8.3) 2008/07/17
=============================================================
Fail2Ban scans log files like /var/log/pwdfail and bans IP
@@ -28,8 +28,8 @@ Optional:
To install, just do:
-> tar xvfj fail2ban-0.8.2.tar.bz2
-> cd fail2ban-0.8.2
+> tar xvfj fail2ban-0.8.3.tar.bz2
+> cd fail2ban-0.8.3
> python setup.py install
This will install Fail2Ban into /usr/share/fail2ban. The
View
@@ -16,11 +16,11 @@
# Author: Cyril Jaquier
#
-# $Revision: 659 $
+# $Revision: 690 $
__author__ = "Cyril Jaquier"
-__version__ = "$Revision: 659 $"
-__date__ = "$Date: 2008-03-05 00:09:30 +0100 (Wed, 05 Mar 2008) $"
+__version__ = "$Revision: 690 $"
+__date__ = "$Date: 2008-05-12 10:34:42 +0200 (Mon, 12 May 2008) $"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL"
@@ -122,7 +122,10 @@ def convert(self):
elif opt == "failregex":
stream.append(["set", self.__name, "failregex", self.__opts[opt]])
elif opt == "ignoreregex":
- stream.append(["set", self.__name, "ignoreregex", self.__opts[opt]])
+ for regex in self.__opts[opt].split('\n'):
+ # Do not send a command if the rule is empty.
+ if regex != '':
+ stream.append(["set", self.__name, "addignoreregex", regex])
stream.extend(self.__filter.convert())
for action in self.__actions:
stream.extend(action.convert())
View
@@ -16,12 +16,12 @@
# Author: Cyril Jaquier
#
-# $Revision: 673 $
+# $Revision: 703 $
__author__ = "Cyril Jaquier"
-__version__ = "$Revision: 673 $"
-__date__ = "$Date: 2008-03-06 00:19:45 +0100 (Thu, 06 Mar 2008) $"
+__version__ = "$Revision: 703 $"
+__date__ = "$Date: 2008-07-17 23:28:51 +0200 (Thu, 17 Jul 2008) $"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL"
-version = "0.8.2"
+version = "0.8.3"
@@ -2,7 +2,7 @@
#
# Author: Cyril Jaquier
#
-# $Revision: 668 $
+# $Revision: 701 $
#
[Definition]
@@ -50,7 +50,7 @@ actioncheck =
#
actionban = printf %%b "`date`: <ip> (<failures> failures)\n" >> <tmpfile>
LINE=$( wc -l <tmpfile> | awk '{ print $1 }' )
- if [ $LINE -eq <lines> ]; then
+ if [ $LINE -ge <lines> ]; then
printf %%b "Hi,\n
These hosts have been banned by Fail2Ban.\n
`cat <tmpfile>`
@@ -2,7 +2,7 @@
#
# Author: Cyril Jaquier
#
-# $Revision: 660 $
+# $Revision: 701 $
#
[Definition]
@@ -59,7 +59,7 @@ actioncheck =
#
actionban = printf %%b "`date`: <ip> (<failures> failures)\n" >> <tmpfile>
LINE=$( wc -l <tmpfile> | awk '{ print $1 }' )
- if [ $LINE -eq <lines> ]; then
+ if [ $LINE -ge <lines> ]; then
printf %%b "Subject: [Fail2Ban] <name>: summary
From: Fail2Ban <<sender>>
To: <dest>\n
@@ -0,0 +1,20 @@
+# Fail2Ban configuration file for wuftpd
+#
+# Author: Kevin Zembower (copied from wsftpd.conf)
+#
+# $Revision: 699 $
+#
+
+[Definition]
+
+# Option: failregex
+# Notes.: regex to match the password failures messages in the logfile.
+# Values: TEXT
+#
+failregex = ftpd(?:\[\d+\])?:\s+repeated login failures from <HOST> \(\S+\)$
+
+# Option: ignoreregex
+# Notes.: regex to ignore. If this regex matches, the line is ignored.
+# Values: TEXT
+#
+ignoreregex =
@@ -4,7 +4,7 @@
#
# Author: Yaroslav Halchenko
#
-# $Revision: 616 $
+# $Revision: 699 $
#
[Definition]
@@ -28,4 +28,8 @@ __line_prefix=(?:\s\S+ %(__daemon_combs_re)s\s+)?
#
failregex = %(__line_prefix)sclient <HOST>#\S+: query(?: \(cache\))? '.*' denied\s*$
-
+# Option: ignoreregex
+# Notes.: regex to ignore. If this regex matches, the line is ignored.
+# Values: TEXT
+#
+ignoreregex =
@@ -0,0 +1,31 @@
+# Fail2Ban configuration file for generic PAM authentication errors
+#
+# Author: Yaroslav Halchenko
+#
+# $Revision: $
+#
+
+[Definition]
+
+# if you want to catch only login erros from specific daemons, use smth like
+#_ttys_re=(?:ssh|pure-ftpd|ftp)
+# To catch all failed logins
+_ttys_re=\S*
+
+#
+# Shortcuts for easier comprehension of the failregex
+__pid_re=(?:\[\d+\])
+__pam_re=\(?pam_unix(?:\(\S+\))?\)?:?
+__pam_combs_re=(?:%(__pid_re)s?:\s+%(__pam_re)s|%(__pam_re)s%(__pid_re)s?:)
+
+# Option: failregex
+# Notes.: regex to match the password failures messages in the logfile.
+# Values: TEXT
+#
+failregex = \s\S+ \S+%(__pam_combs_re)s\s+authentication failure; logname=\S* uid=\S* euid=\S* tty=%(_ttys_re)s ruser=\S* rhost=<HOST>(?:\s+user=.*)?\s*$
+
+# Option: ignoreregex
+# Notes.: regex to ignore. If this regex matches, the line is ignored.
+# Values: TEXT
+#
+ignoreregex =
@@ -2,7 +2,7 @@
#
# Author: Yaroslav Halchenko
#
-# $Revision: 665 $
+# $Revision: 677 $
#
[Definition]
@@ -14,7 +14,7 @@
# (?:::f{4,6}:)?(?P<host>\S+)
# Values: TEXT
#
-failregex = \(\S+\[<HOST>\]\)[: -]+ USER \S+: no such user found from \S+ \[[0-9.]+\] to \S+:\S+$
+failregex = \(\S+\[<HOST>\]\)[: -]+ USER \S+: no such user found from \S+ \[\S+\] to \S+:\S+$
\(\S+\[<HOST>\]\)[: -]+ USER \S+ \(Login failed\): Incorrect password\.$
\(\S+\[<HOST>\]\)[: -]+ SECURITY VIOLATION: \S+ login attempted\.$
\(\S+\[<HOST>\]\)[: -]+ Maximum login attempts \(\d+\) exceeded$
@@ -2,7 +2,7 @@
#
# Author: Yaroslav Halchenko
#
-# $Revision: 592 $
+# $Revision: 699 $
#
[Definition]
@@ -12,3 +12,9 @@
# Values: TEXT
#
failregex = wu-ftpd(?:\[\d+\])?:\s+\(pam_unix\)\s+authentication failure.* rhost=<HOST>$
+
+# Option: ignoreregex
+# Notes.: regex to ignore. If this regex matches, the line is ignored.
+# Values: TEXT
+#
+ignoreregex =
View
@@ -27,7 +27,7 @@ start() {
echo -n $"Starting fail2ban: "
getpid
if [ -z "$pid" ]; then
- rm -rf /tmp/fail2ban.sock # in case of unclean shutdown
+ rm -rf /var/run/fail2ban/fail2ban.sock # in case of unclean shutdown
$FAIL2BAN start > /dev/null
RETVAL=$?
fi
View
@@ -16,7 +16,7 @@
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/sbin:/usr/bin:/bin
FAIL2BAN_BIN=/usr/local/bin/fail2ban-client
FAIL2BAN_SERVER=/usr/local/bin/fail2ban-server
-FAIL2BAN_SOCKET=/tmp/fail2ban.sock
+FAIL2BAN_SOCKET=/var/run/fail2ban/fail2ban.sock
test -x $FAIL2BAN_BIN || { echo "$FAIL2BAN_BIN not installed";
if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; }
View
@@ -16,11 +16,11 @@
# Author: Cyril Jaquier
#
-# $Revision: 635 $
+# $Revision: 682 $
__author__ = "Cyril Jaquier"
-__version__ = "$Revision: 635 $"
-__date__ = "$Date: 2007-12-16 22:38:04 +0100 (Sun, 16 Dec 2007) $"
+__version__ = "$Revision: 682 $"
+__date__ = "$Date: 2008-04-08 00:25:16 +0200 (Tue, 08 Apr 2008) $"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL"
@@ -106,7 +106,7 @@ def delCInfo(self, key):
def setActionStart(self, value):
self.__actionStart = value
- logSys.info("Set actionStart = %s" % value)
+ logSys.debug("Set actionStart = %s" % value)
##
# Get the "start" command.
@@ -135,7 +135,7 @@ def execActionStart(self):
def setActionBan(self, value):
self.__actionBan = value
- logSys.info("Set actionBan = %s" % value)
+ logSys.debug("Set actionBan = %s" % value)
##
# Get the "ban" command.
@@ -160,7 +160,7 @@ def execActionBan(self, aInfo):
def setActionUnban(self, value):
self.__actionUnban = value
- logSys.info("Set actionUnban = %s" % value)
+ logSys.debug("Set actionUnban = %s" % value)
##
# Get the "unban" command.
@@ -185,7 +185,7 @@ def execActionUnban(self, aInfo):
def setActionCheck(self, value):
self.__actionCheck = value
- logSys.info("Set actionCheck = %s" % value)
+ logSys.debug("Set actionCheck = %s" % value)
##
# Get the "check" command.
@@ -202,7 +202,7 @@ def getActionCheck(self):
def setActionStop(self, value):
self.__actionStop = value
- logSys.info("Set actionStop = %s" % value)
+ logSys.debug("Set actionStop = %s" % value)
##
# Get the "stop" command.
View
@@ -132,7 +132,7 @@ def start(self, sock, force):
# Sets the init flag.
self.__init = True
# TODO Add try..catch
- asyncore.loop()
+ asyncore.loop(use_poll = True)
##
# Stops the communication server.
Oops, something went wrong.

0 comments on commit 68e22af

Please sign in to comment.