projects
/
iptables-cn.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
287632e
)
r10: - touch inactive rule
author
Dinko Korunic
<Dinko.Korunic@CARNet.hr>
Mon, 24 Sep 2007 13:50:10 +0000
(13:50 +0000)
committer
Dinko Korunic
<Dinko.Korunic@CARNet.hr>
Mon, 24 Sep 2007 13:50:10 +0000
(13:50 +0000)
- save active anyway
debian/postinst
patch
|
blob
|
history
diff --git
a/debian/postinst
b/debian/postinst
index
2beb6a1
..
81d185d
100755
(executable)
--- a/
debian/postinst
+++ b/
debian/postinst
@@
-51,8
+51,14
@@
if [ ! -e /var/lib/iptables/active ]; then
if ! iptables-save | grep '^-' >/dev/null; then
echo "CN: Netfilter rules empty: importing SSH bruteforce rules"
. /usr/share/doc/iptables-cn/examples/ssh-bruteforce
if ! iptables-save | grep '^-' >/dev/null; then
echo "CN: Netfilter rules empty: importing SSH bruteforce rules"
. /usr/share/doc/iptables-cn/examples/ssh-bruteforce
- iptables-save > /var/lib/iptables/active
fi
fi
+ echo "CN: Saving current Netfilter rules to /var/lib/iptables/active"
+ iptables-save > /var/lib/iptables/active
+fi
+
+# create inactive
+if [ ! -e /var/lib/iptables/inactive ]; then
+ touch /var/lib/iptables/inactive
fi
# dh_installdeb will replace this with shell code automatically
fi
# dh_installdeb will replace this with shell code automatically