merged with upstream

debian-releases/etch debian/0.5.4-1
Yaroslav Halchenko 2005-09-20 16:37:44 +00:00
parent 018e4a115d
commit b54377be2c
9 changed files with 58 additions and 35 deletions

View File

@ -4,9 +4,22 @@
|_| \__,_|_|_/___|_.__/\__,_|_||_| |_| \__,_|_|_/___|_.__/\__,_|_||_|
============================================================= =============================================================
Fail2Ban (version 0.5.3) 2005/09/08 Fail2Ban (version 0.5.4) 2005/09/13
============================================================= =============================================================
ver. 0.5.4 (2005/09/13) - beta
----------
- Fixed bug #1286222.
- Propagated patches introduced by Debian maintainer
(Yaroslav Halchenko):
* Fixed handling of SYSLOG logging target. Now it can log
to any SYSLOG target and facility as directed by the
config
* Format of SYSLOG entries fixed to look closer to standard
* Fixed errata in config/gentoo-confd
* Introduced findtime configuration variable to control the
lifetime of caught "failed" log entries
ver. 0.5.3 (2005/09/08) - beta ver. 0.5.3 (2005/09/08) - beta
---------- ----------
- Fixed a bug when overriding "maxfailures" or "bantime". - Fixed a bug when overriding "maxfailures" or "bantime".

View File

@ -1,6 +1,6 @@
Metadata-Version: 1.0 Metadata-Version: 1.0
Name: fail2ban Name: fail2ban
Version: 0.5.3 Version: 0.5.4
Summary: Ban IPs that make too many password failure Summary: Ban IPs that make too many password failure
Home-page: http://fail2ban.sourceforge.net Home-page: http://fail2ban.sourceforge.net
Author: Cyril Jaquier Author: Cyril Jaquier

6
README
View File

@ -4,7 +4,7 @@
|_| \__,_|_|_/___|_.__/\__,_|_||_| |_| \__,_|_|_/___|_.__/\__,_|_||_|
============================================================= =============================================================
Fail2Ban (version 0.5.3) 2005/09/08 Fail2Ban (version 0.5.4) 2005/09/13
============================================================= =============================================================
Fail2Ban scans log files like /var/log/pwdfail and bans IP Fail2Ban scans log files like /var/log/pwdfail and bans IP
@ -58,8 +58,8 @@ Require: python-2.3 (http://www.python.org)
To install, just do: To install, just do:
> tar xvfj fail2ban-0.5.3.tar.bz2 > tar xvfj fail2ban-0.5.4.tar.bz2
> cd fail2ban-0.5.3 > cd fail2ban-0.5.4
> python setup.py install > python setup.py install
This will install Fail2Ban into /usr/lib/fail2ban. The fail2ban This will install Fail2Ban into /usr/lib/fail2ban. The fail2ban

View File

@ -1,6 +1,6 @@
# Fail2Ban configuration file # Fail2Ban configuration file
# #
# $Revision: 1.8.2.11 $ # $Revision: 1.8.2.13 $
# #
# 2005.06.21 modified for readability Iain Lea iain@bricbrac.de # 2005.06.21 modified for readability Iain Lea iain@bricbrac.de
@ -23,14 +23,16 @@ debug = false
# #
logtargets = /var/log/fail2ban.log logtargets = /var/log/fail2ban.log
# Option: syslog-target # Option: syslog-target
# Notes.: where to find syslog facility if logtarget SYSLOG. # Notes.: where to find syslog facility if logtarget SYSLOG.
# Values: file(socket) hostname hostname:port Default: /dev/log # Values: SOCKET HOST HOST:PORT Default: /dev/log
#
syslog-target = /dev/log syslog-target = /dev/log
# Option: syslog-facility # Option: syslog-facility
# Notes.: which syslog facility to use if logtarget SYSLOG. # Notes.: which syslog facility to use if logtarget SYSLOG.
# Values: NUM Default: 1 # Values: NUM Default: 1
#
syslog-facility = 1 syslog-facility = 1
# Option: pidlock # Option: pidlock

View File

@ -16,7 +16,7 @@
# #
# Author: Cyril Jaquier # Author: Cyril Jaquier
# #
# $Revision: 1.1 $ # $Revision: 1.1.2.1 $
# Command line options for Fail2Ban. Refer to "fail2ban -h" for # Command line options for Fail2Ban. Refer to "fail2ban -h" for
# valid options. # valid options.

7
debian/changelog vendored
View File

@ -1,7 +1,14 @@
fail2ban (0.5.4-1) unstable; urgency=low
* New upstream release
-- Yaroslav Halchenko <debian@onerussian.com> Tue, 20 Sep 2005 12:19:19 -0400
fail2ban (0.5.3-2) unstable; urgency=low fail2ban (0.5.3-2) unstable; urgency=low
* Refined comments in README.Debian * Refined comments in README.Debian
* Reindented init.d script * Reindented init.d script
P.S. Was not released
-- Yaroslav Halchenko <debian@onerussian.com> Sun, 11 Sep 2005 15:19:44 -0400 -- Yaroslav Halchenko <debian@onerussian.com> Sun, 11 Sep 2005 15:19:44 -0400

View File

@ -17,11 +17,11 @@
# Author: Cyril Jaquier # Author: Cyril Jaquier
# Modified by: Yaroslav Halchenko (SYSLOG, findtime) # Modified by: Yaroslav Halchenko (SYSLOG, findtime)
# #
# $Revision: 1.20.2.16 $ # $Revision: 1.20.2.18 $
__author__ = "Cyril Jaquier" __author__ = "Cyril Jaquier"
__version__ = "$Revision: 1.20.2.16 $" __version__ = "$Revision: 1.20.2.18 $"
__date__ = "$Date: 2005/09/05 21:12:08 $" __date__ = "$Date: 2005/09/13 20:42:33 $"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier" __copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL" __license__ = "GPL"
@ -249,9 +249,8 @@ def main():
if target == "STDERR": if target == "STDERR":
hdlr = logging.StreamHandler(sys.stderr) hdlr = logging.StreamHandler(sys.stderr)
elif target == "SYSLOG": elif target == "SYSLOG":
# SYSLOG target can be either # SYSLOG target can be either
# a socket (file, so it starts with /) # a socket (file, so it starts with /)
# or hostname # or hostname
# or hostname:port # or hostname:port
syslogtargets = re.findall("(/[\w/]*)|([^/ ][^: ]*)(:(\d+)){,1}", syslogtargets = re.findall("(/[\w/]*)|([^/ ][^: ]*)(:(\d+)){,1}",
@ -270,7 +269,7 @@ def main():
else: else:
if not ( syslogtargets[0] == "" ): # got socket if not ( syslogtargets[0] == "" ): # got socket
syslogtarget = syslogtargets[0] syslogtarget = syslogtargets[0]
else: # got hostname and may be a port else: # got hostname and maybe a port
if syslogtargets[3] == "": # no port specified if syslogtargets[3] == "": # no port specified
port = 514 port = 514
else: else:
@ -355,7 +354,6 @@ def main():
for t in confReader.getSections(): for t in confReader.getSections():
l = confReader.getLogOptions(t, optionValues) l = confReader.getLogOptions(t, optionValues)
if l["enabled"]: if l["enabled"]:
# Creates a logreader object # Creates a logreader object
lObj = LogReader(l["logfile"], l["timeregex"], l["timepattern"], lObj = LogReader(l["logfile"], l["timeregex"], l["timepattern"],
l["failregex"], l["maxfailures"], l["findtime"]) l["failregex"], l["maxfailures"], l["findtime"])

View File

@ -16,17 +16,18 @@
# Author: Cyril Jaquier # Author: Cyril Jaquier
# #
# $Revision: 1.1.2.3 $ # $Revision: 1.1.2.4 $
__author__ = "Cyril Jaquier" __author__ = "Cyril Jaquier"
__version__ = "$Revision: 1.1.2.3 $" __version__ = "$Revision: 1.1.2.4 $"
__date__ = "$Date: 2005/09/08 18:05:59 $" __date__ = "$Date: 2005/09/12 14:42:08 $"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier" __copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL" __license__ = "GPL"
import logging, smtplib import logging, smtplib
from utils.strings import replaceTag from utils.strings import replaceTag
from time import strftime, gmtime
# Gets the instance of the logger. # Gets the instance of the logger.
logSys = logging.getLogger("fail2ban") logSys = logging.getLogger("fail2ban")
@ -55,8 +56,10 @@ class Mail:
subj = replaceTag(subject, aInfo) subj = replaceTag(subject, aInfo)
msg = replaceTag(message, aInfo) msg = replaceTag(message, aInfo)
mail = ("From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n" % mail = ("From: %s\r\nTo: %s\r\nDate: %s\r\nSubject: %s\r\n\r\n" %
(self.fromAddr, ", ".join(self.toAddr), subj)) + msg (self.fromAddr, ", ".join(self.toAddr),
strftime("%a, %d %b %Y %H:%M:%S +0000", gmtime()),
subj)) + msg
try: try:
server = smtplib.SMTP(self.host, self.port) server = smtplib.SMTP(self.host, self.port)

View File

@ -16,12 +16,12 @@
# Author: Cyril Jaquier # Author: Cyril Jaquier
# #
# $Revision: 1.12.2.8 $ # $Revision: 1.12.2.10 $
__author__ = "Cyril Jaquier" __author__ = "Cyril Jaquier"
__version__ = "$Revision: 1.12.2.8 $" __version__ = "$Revision: 1.12.2.10 $"
__date__ = "$Date: 2005/09/08 18:20:51 $" __date__ = "$Date: 2005/09/13 20:43:00 $"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier" __copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL" __license__ = "GPL"
version = "0.5.3" version = "0.5.4"