projects
/
iptables-cn.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3cc8246
)
- fix za bug koji je uocio Ljubomir sa dashem kao shellom
origin
squeeze
v1.4.8
author
Dinko Korunic
<kreator@carnet.hr>
Wed, 11 May 2011 17:56:07 +0000
(19:56 +0200)
committer
Dinko Korunic
<kreator@carnet.hr>
Wed, 11 May 2011 17:56:07 +0000
(19:56 +0200)
debian/postinst
patch
|
blob
|
history
diff --git
a/debian/postinst
b/debian/postinst
index
6a57a0d
..
4ac4576
100755
(executable)
--- a/
debian/postinst
+++ b/
debian/postinst
@@
-42,9
+42,7
@@
if [ -e /etc/default/iptables ]; then
fi
# check to see if fail2ban is installed
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 \
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 \