+fail2ban-cn (0.8.6~cn0) stable; urgency=low
+
+ * Prva verzija za wheezy
+ * Podrska za Dovecot je sada u Debianovom paketu
+ * Ispravke za Lintian
+ * Izbacen debian/postrm jer nije potreban (izbacivao je konfiguraciju
+ za Dovecot)
+
+ -- Ivan Rako <Ivan.Rako@CARNet.hr> Wed, 28 Aug 2013 15:57:09 +0200
+
fail2ban-cn (0.8.5) stable; urgency=low
* nova Dovecot pravila
Source: fail2ban-cn
Section: net
Priority: optional
-Maintainer: Dinko Korunic <kreator@CARNet.hr>
-Build-Depends: debhelper (>= 7)
-Standards-Version: 3.9.1
+Maintainer: Ivan Rako <Ivan.Rako@CARNet.hr>
+Build-Depends: debhelper (>= 8)
+Standards-Version: 3.9.3
Package: fail2ban-cn
Architecture: all
-Depends: fail2ban (>= 0.8.4-3), gamin (>= 0.1.10-2+b1), python-gamin (>= 0.1.10-2+b1), ${misc:Depends}
+Depends: ${misc:Depends}, fail2ban (>= 0.8.6), gamin (>= 0.1.10-4.1), python-gamin (>= 0.1.10-4.1)
Description: bans IPs that cause multiple authentication errors
Monitors log files (e.g. /var/log/auth.log,
/var/log/apache/access.log) and temporarily or persistently bans
-Copyright 2011 CARNet
+Copyright 2006 CARNet <paketi@carnet.hr>
You are free to distribute this software package under the terms of the
GNU General Public License.
+++ /dev/null
-dovecot.conf etc/fail2ban/filter.d
# import CN-functions
. /usr/share/carnet-tools/functions.sh
-CONF=/etc/fail2ban/jail.conf
+CONF="/etc/fail2ban/jail.conf"
if [ -e "$CONF" ]; then
# enable ssh, pam-generic, sasl, proftpd and vsftpd service
- echo "CN: Enabling SSH, PAM-generic, SASL, Proftpd and Vsftpd support"
- perl -ne 'if (/^\[(ssh|pam-generic|sasl|proftpd|vsftpd)\]/ .. /^enabled/) { $_ =~ s/^enabled\s+=\s+false/enabled = true/gi }; print $_' "$CONF" > "$CONF.$$" && \
+ echo "CN: Enabling SSH, PAM-generic, SASL, ProFTPD, vsftpd and Dovecot support..."
+ perl -ne 'if (/^\[(ssh|pam-generic|sasl|proftpd|vsftpd|dovecot)\]/ .. /^enabled/) { $_ =~ s/^enabled\s+=\s+false/enabled = true/gi }; print $_' "$CONF" > "$CONF.$$" && \
cp_mv "$CONF.$$" "$CONF"
rm -f "$CONF.$$"
- # enable dovecot service
- echo "CN: Enabling full Dovecot support"
- cp -a "$CONF" "$CONF.$$"
- cp-update fail2ban-cn "$CONF.$$" <<EOF
-[dovecot]
-
-enabled = true
-port = 110,143
-protocol = tcp
-filter = dovecot
-logpath = /var/log/mail.log
-EOF
- cp_mv "$CONF.$$" "$CONF"
-
# add network address and class if needed
cp_get_netaddr || true
NETADDR="$RET"
IGNOREIP=$(grep '^ignoreip' "$CONF")
if ! echo "$IGNOREIP" | grep -q "$NETADDR"; then
- echo "CN: Enabling local IP ranges exclusion"
+ echo "CN: Enabling local IP ranges exclusion..."
cp_check_and_sed '^ignoreip' \
"s;^\(ignoreip.*\)$;\1 $NETADDR;g" "$CONF" || true
fi
+++ /dev/null
-#!/bin/sh
-# postrm script for monit-cn
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-# * <postrm> `remove'
-# * <postrm> `purge'
-# * <old-postrm> `upgrade' <new-version>
-# * <new-postrm> `failed-upgrade' <old-version>
-# * <new-postrm> `abort-install'
-# * <new-postrm> `abort-install' <old-version>
-# * <new-postrm> `abort-upgrade' <old-version>
-# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-case "$1" in
- purge)
- # continue below
- ;;
-
- *)
- exit 0
- ;;
-esac
-
-# import CN-functions
-. /usr/share/carnet-tools/functions.sh
-
-CONF=/etc/fail2ban/jail.conf
-
-# remove us from inittab
-echo "CN: Removing Dovecot support"
-cp-update -r fail2ban-cn "$CONF"
-
-# restart the services
-if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
- invoke-rc.d fail2ban restart || exit $?
-else
- /etc/init.d/fail2ban restart || exit $?
-fi
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
+++ /dev/null
-# Fail2Ban configuration file
-#
-# Author: CARNet grupa za pakete
-
-[Definition]
-
-# Option: failregex
-# Notes.: regex to match the password failures messages in the logfile. The
-# host must be matched by a group named "host". The tag "<HOST>" can
-# be used for standard IP/hostname matching and is only an alias for
-# (?:::f{4,6}:)?(?P<host>\S+)
-# Values: TEXT
-#
-#failregex = dovecot.*auth\(default\): pam\(.*,<HOST>\): pam_authenticate\(\) failed:
-failregex = (?: pop3-login|imap-login): (?:Authentication failure|Aborted login \(auth failed|Aborted login \(tried to use disabled|Disconnected \(auth failed).*rip=(?P<host>\S*),.*
-
-# Option: ignoreregex
-# Notes.: regex to ignore. If this regex matches, the line is ignored.
-# Values: TEXT
-#
-ignoreregex =