From: Dinko Korunic Date: Wed, 11 May 2011 17:56:07 +0000 (+0200) Subject: - fix za bug koji je uocio Ljubomir sa dashem kao shellom X-Git-Tag: v1.4.8^0 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=iptables-cn.git;a=commitdiff_plain;h=refs%2Ftags%2Fv1.4.8 - fix za bug koji je uocio Ljubomir sa dashem kao shellom --- diff --git a/debian/postinst b/debian/postinst index 6a57a0d..4ac4576 100755 --- a/debian/postinst +++ b/debian/postinst @@ -42,9 +42,7 @@ if [ -e /etc/default/iptables ]; then fi # check to see if fail2ban is installed -check=(fail2ban fail2ban-cn) -check=$(dpkg -s $check 2> /dev/null | egrep '^Package:|^Status:' | awk '{if ($1 ~ /^Package:/) { package=$2 } else if ($0 ~ /^Status: .* installed$/) { print package }}') -if [ "x$check" != "x" ]; then +if dpkg -l fail2ban | grep -q '^.i'; then echo "CN: Detected Fail2Ban installation, will remove SSH bruteforce rules by default" iptables -D SSH_Brute_Force -m recent ! --rcheck --seconds 90 \ --hitcount 3 --name SSH --rsource \