From dae225330c32638a31510c71129ef7130f99bb87 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 5 Sep 2006 15:16:03 +0000 Subject: [PATCH] added debian specific patches for the new upstream --- debian/changelog | 4 +- debian/patches/00list | 4 ++ .../patches/X00_apache_log_failregex.dpatch | 17 +++++++++ debian/patches/X00_apache_log_path.dpatch | 20 ++++++++++ debian/patches/X00_default_jails.dpatch | 37 +++++++++++++++++++ debian/patches/X00_ssh_path.dpatch | 20 ++++++++++ 6 files changed, 100 insertions(+), 2 deletions(-) create mode 100755 debian/patches/X00_apache_log_failregex.dpatch create mode 100755 debian/patches/X00_apache_log_path.dpatch create mode 100755 debian/patches/X00_default_jails.dpatch create mode 100755 debian/patches/X00_ssh_path.dpatch diff --git a/debian/changelog b/debian/changelog index b37100b7..62de1bd1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ -fail2ban (0.7.1-1) UNRELEASED; urgency=low +fail2ban (0.7.1-0.1) UNRELEASED; urgency=low - * (NOT RELEASED YET) New upstream release + * New upstream release (closes: #370095,#366307) -- Yaroslav Halchenko Tue, 5 Sep 2006 00:26:08 -0400 diff --git a/debian/patches/00list b/debian/patches/00list index 79c58d7e..7c2de688 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -1 +1,5 @@ X00_rigid_python24 +X00_ssh_path +X00_apache_log_path +X00_default_jails +X00_apache_log_failregex diff --git a/debian/patches/X00_apache_log_failregex.dpatch b/debian/patches/X00_apache_log_failregex.dpatch new file mode 100755 index 00000000..27a3f2e4 --- /dev/null +++ b/debian/patches/X00_apache_log_failregex.dpatch @@ -0,0 +1,17 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## apache_log_failregex.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fixed apache failregex + +@DPATCH@ + +diff -Naur -x '*~' fail2ban-0.7.1/config/filter.d/apache-auth.conf fail2ban-0.7.1.modified/config/filter.d/apache-auth.conf +--- fail2ban-0.7.1/config/filter.d/apache-auth.conf 2006-09-05 11:13:54.000000000 -0400 ++++ fail2ban-0.7.1.modified/config/filter.d/apache-auth.conf 2006-09-05 11:12:19.000000000 -0400 +@@ -39,4 +39,4 @@ + # Notes.: regex to match the password failure messages in the logfile. + # Values: TEXT Default: authentication failure|user .* not found + # +-failregex = authentication failure|user .* not found ++failregex = [[]client (?P\S*)[]] user .*(?:: authentication failure|not found) diff --git a/debian/patches/X00_apache_log_path.dpatch b/debian/patches/X00_apache_log_path.dpatch new file mode 100755 index 00000000..67ff1a46 --- /dev/null +++ b/debian/patches/X00_apache_log_path.dpatch @@ -0,0 +1,20 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## apache_log_path.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fixed apache path to the default in debian + +@DPATCH@ + +diff -Naur -x '*~' fail2ban-0.7.1/config/filter.d/apache-auth.conf fail2ban-0.7.1.modified/config/filter.d/apache-auth.conf +--- fail2ban-0.7.1/config/filter.d/apache-auth.conf 2006-07-17 15:25:03.000000000 -0400 ++++ fail2ban-0.7.1.modified/config/filter.d/apache-auth.conf 2006-09-05 10:59:07.000000000 -0400 +@@ -17,7 +17,7 @@ + # Notes.: logfile to monitor. + # Values: FILE Default: /var/log/httpd/access_log + # +-logfile = /var/log/httpd/access_log ++logfile = /var/log/apache/error.log + + # Option: timeregex + # Notes.: regex to match timestamp in Apache logfile. For TAI64N format, diff --git a/debian/patches/X00_default_jails.dpatch b/debian/patches/X00_default_jails.dpatch new file mode 100755 index 00000000..79f95242 --- /dev/null +++ b/debian/patches/X00_default_jails.dpatch @@ -0,0 +1,37 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## debian_jail.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Default debian jails + +@DPATCH@ + +diff -Naur -x '*~' fail2ban-0.7.1/config/jail.conf fail2ban-0.7.1.modified/config/jail.conf +--- fail2ban-0.7.1/config/jail.conf 2006-08-20 17:33:11.000000000 -0400 ++++ fail2ban-0.7.1.modified/config/jail.conf 2006-09-05 10:56:44.000000000 -0400 +@@ -5,11 +5,20 @@ + # $Revision: 281 $ + # + +-[dummy] ++[SSH] + +-enabled = false ++enabled = true + filter = sshd +-action = hostsdeny[file=/tmp/hosts.deny] +- mail[name=SSH, dest=cyril.jaquier@bluewin.ch] +-maxretry = 2 ++action = iptables ++ mail[name=SSH, dest=root@localhost] ++maxretry = 5 ++bantime = 10 ++ ++[Apache] ++ ++enabled = false ++filter = apache-auth ++action = iptables ++ mail[name=Apache, dest=root@localhost] ++maxretry = 5 + bantime = 10 diff --git a/debian/patches/X00_ssh_path.dpatch b/debian/patches/X00_ssh_path.dpatch new file mode 100755 index 00000000..d9bfbdb8 --- /dev/null +++ b/debian/patches/X00_ssh_path.dpatch @@ -0,0 +1,20 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## ssh_path.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Debian specific ssh path + +@DPATCH@ + +diff -x '*~' -Naur fail2ban-0.7.1/config/filter.d/sshd.conf fail2ban-0.7.1.modified/config/filter.d/sshd.conf +--- fail2ban-0.7.1/config/filter.d/sshd.conf 2006-08-06 18:12:57.000000000 -0400 ++++ fail2ban-0.7.1.modified/config/filter.d/sshd.conf 2006-09-05 10:39:21.000000000 -0400 +@@ -17,7 +17,7 @@ + # Notes.: logfile to monitor. + # Values: FILE Default: /var/log/secure + # +-logpath = /var/log/secure ++logpath = /var/log/auth.log + + # Option: timeregex + # Notes.: regex to match timestamp in SSH logfile. For TAI64N format,