From 0012f9ff921c9ab1725574abc40fe1ffb4c364c3 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 15 Aug 2007 02:17:44 +0000 Subject: [PATCH] * (NOT RELEASED YET) New upstream release. Patches absorbed upstream: 00_daemon_pids.dpatch 00_iptables_allports.dpatch 00_vsftp_filter_spaces.dpatch 00_resolve_all_names.dpatch 00_HOST_ignoreregex.dpatch Patches which needed some tune-up: 00_ssh_strong_re.dpatch 00_mail-whois-lines.dpatch 00_named_refused.dpatch --- debian/changelog | 12 ++- debian/patches/00_HOST_ignoreregex.dpatch | 34 -------- debian/patches/00_daemon_pids.dpatch | 52 ------------- debian/patches/00_iptables_allports.dpatch | 82 -------------------- debian/patches/00_mail-whois-lines.dpatch | 14 +--- debian/patches/00_named_refused.dpatch | 40 +--------- debian/patches/00_resolve_all_names.dpatch | 30 ------- debian/patches/00_ssh_strong_re.dpatch | 25 +----- debian/patches/00_vsftp_filter_spaces.dpatch | 21 ----- debian/patches/00list | 6 -- 10 files changed, 19 insertions(+), 297 deletions(-) delete mode 100755 debian/patches/00_HOST_ignoreregex.dpatch delete mode 100755 debian/patches/00_daemon_pids.dpatch delete mode 100755 debian/patches/00_iptables_allports.dpatch delete mode 100755 debian/patches/00_resolve_all_names.dpatch delete mode 100755 debian/patches/00_vsftp_filter_spaces.dpatch diff --git a/debian/changelog b/debian/changelog index 513c3575..f318102d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,16 @@ fail2ban (0.8.1-1) UNRELEASED; urgency=low - * (NOT RELEASED YET) New upstream release + * (NOT RELEASED YET) New upstream release. + Patches absorbed upstream: + 00_daemon_pids.dpatch + 00_iptables_allports.dpatch + 00_vsftp_filter_spaces.dpatch + 00_resolve_all_names.dpatch + 00_HOST_ignoreregex.dpatch + Patches which needed some tune-up: + 00_ssh_strong_re.dpatch + 00_mail-whois-lines.dpatch + 00_named_refused.dpatch -- Yaroslav Halchenko Tue, 14 Aug 2007 19:12:53 -0400 diff --git a/debian/patches/00_HOST_ignoreregex.dpatch b/debian/patches/00_HOST_ignoreregex.dpatch deleted file mode 100755 index 3284738b..00000000 --- a/debian/patches/00_HOST_ignoreregex.dpatch +++ /dev/null @@ -1,34 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 00_HOST_ignoreregex.dpatch by Yaroslav Halchenko -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -urNad trunk~/server/failregex.py trunk/server/failregex.py ---- trunk~/server/failregex.py 2007-05-05 21:30:22.000000000 -0400 -+++ trunk/server/failregex.py 2007-06-19 23:00:45.000000000 -0400 -@@ -40,9 +40,7 @@ - # avoid construction of invalid object. - # @param value the regular expression - -- def __init__(self, value): -- # Replace "" with default regular expression for host. -- regex = value.replace("", "(?:::f{4,6}:)?(?P\S+)") -+ def __init__(self, regex): - # Initializes the parent. - Regex.__init__(self, regex) - # Check for group "host" -diff -urNad trunk~/server/regex.py trunk/server/regex.py ---- trunk~/server/regex.py 2007-05-05 21:30:22.000000000 -0400 -+++ trunk/server/regex.py 2007-06-19 23:00:21.000000000 -0400 -@@ -42,6 +42,9 @@ - - def __init__(self, regex): - self._matchCache = None -+ # Perform shortcuts expansions -+ # Replace "" with default regular expression for host. -+ regex = regex.replace("", "(?:::f{4,6}:)?(?P\S+)") - if regex.lstrip() == '': - raise RegexException("Cannot add empty regex") - try: diff --git a/debian/patches/00_daemon_pids.dpatch b/debian/patches/00_daemon_pids.dpatch deleted file mode 100755 index 8a36f5be..00000000 --- a/debian/patches/00_daemon_pids.dpatch +++ /dev/null @@ -1,52 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 00_daemon_pids.dpatch by Yaroslav Halchenko -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Optional PID entry which might not be present due to configuration. Also failregex for wu-ftpd got hardened with $ at the end. - -@DPATCH@ -diff -urNad trunk~/config/filter.d/pure-ftpd.conf trunk/config/filter.d/pure-ftpd.conf ---- trunk~/config/filter.d/pure-ftpd.conf 2007-05-05 21:30:21.000000000 -0400 -+++ trunk/config/filter.d/pure-ftpd.conf 2007-06-19 23:08:40.000000000 -0400 -@@ -19,7 +19,7 @@ - # (?:::f{4,6}:)?(?P\S+) - # Values: TEXT - # --failregex = pure-ftpd: (.+?@) \[WARNING\] %(__errmsg)s \[.+\]$ -+failregex = pure-ftpd(?:\[\d+\])?: (.+?@) \[WARNING\] %(__errmsg)s \[.+\]$ - - # Option: ignoreregex - # Notes.: regex to ignore. If this regex matches, the line is ignored. -diff -urNad trunk~/config/filter.d/sshd-ddos.conf trunk/config/filter.d/sshd-ddos.conf ---- trunk~/config/filter.d/sshd-ddos.conf 2007-05-05 21:30:21.000000000 -0400 -+++ trunk/config/filter.d/sshd-ddos.conf 2007-06-19 23:09:56.000000000 -0400 -@@ -14,7 +14,7 @@ - # (?:::f{4,6}:)?(?P\S+) - # Values: TEXT - # --failregex = sshd\[\S*\]: Did not receive identification string from -+failregex = sshd(?:\[\d+\])?: Did not receive identification string from $ - - # Option: ignoreregex - # Notes.: regex to ignore. If this regex matches, the line is ignored. -diff -urNad trunk~/config/filter.d/vsftpd.conf trunk/config/filter.d/vsftpd.conf ---- trunk~/config/filter.d/vsftpd.conf 2007-05-05 21:30:21.000000000 -0400 -+++ trunk/config/filter.d/vsftpd.conf 2007-06-19 23:10:26.000000000 -0400 -@@ -14,7 +14,7 @@ - # (?:::f{4,6}:)?(?P\S+) - # Values: TEXT - # --failregex = vsftpd: .* authentication failure; .* rhost=$ -+failregex = vsftpd(?:\[\d+\])?: .* authentication failure; .* rhost=$ - \[.+\] FAIL LOGIN: Client ""$ - - # Option: ignoreregex -diff -urNad trunk~/config/filter.d/wuftpd.conf trunk/config/filter.d/wuftpd.conf ---- trunk~/config/filter.d/wuftpd.conf 2007-05-05 21:30:21.000000000 -0400 -+++ trunk/config/filter.d/wuftpd.conf 2007-06-19 23:11:59.000000000 -0400 -@@ -11,4 +11,4 @@ - # Notes.: regex to match the password failures messages in the logfile. - # Values: TEXT - # --failregex = wu-ftpd\[\d+\]:\s+\(pam_unix\)\s+authentication failure.* rhost= -+failregex = wu-ftpd(?:\[\d+\])?:\s+\(pam_unix\)\s+authentication failure.* rhost=$ diff --git a/debian/patches/00_iptables_allports.dpatch b/debian/patches/00_iptables_allports.dpatch deleted file mode 100755 index 82157fd3..00000000 --- a/debian/patches/00_iptables_allports.dpatch +++ /dev/null @@ -1,82 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 00_iptables_allports.dpatch by Yaroslav Halchenko -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -urNad trunk~/config/action.d/iptables-allports.conf trunk/config/action.d/iptables-allports.conf ---- trunk~/config/action.d/iptables-allports.conf 1969-12-31 19:00:00.000000000 -0500 -+++ trunk/config/action.d/iptables-allports.conf 2007-06-25 12:49:34.000000000 -0400 -@@ -0,0 +1,71 @@ -+# Fail2Ban configuration file -+# -+# Author: Cyril Jaquier -+# Modified: Yaroslav O. Halchenko -+# made active on all ports from original iptables.conf -+# -+# $Revision: $ -+# -+ -+[Definition] -+ -+# Option: actionstart -+# Notes.: command executed once at the start of Fail2Ban. -+# Values: CMD -+# -+actionstart = iptables -N fail2ban- -+ iptables -A fail2ban- -j RETURN -+ iptables -I INPUT -p -j fail2ban- -+ -+# Option: actionend -+# Notes.: command executed once at the end of Fail2Ban -+# Values: CMD -+# -+actionstop = iptables -D INPUT -p -j fail2ban- -+ iptables -F fail2ban- -+ iptables -X fail2ban- -+ -+# Option: actioncheck -+# Notes.: command executed once before each actionban command -+# Values: CMD -+# -+actioncheck = iptables -n -L INPUT | grep -q fail2ban- -+ -+# Option: actionban -+# Notes.: command executed when banning an IP. Take care that the -+# command is executed with Fail2Ban user rights. -+# Tags: IP address -+# number of failures -+#