summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérôme Schneider <jschneider@entrouvert.com>2013-11-15 10:21:15 (GMT)
committerJérôme Schneider <jschneider@entrouvert.com>2013-11-15 10:21:15 (GMT)
commit033410319d74fb0a976b05d0508e3b27042111b0 (patch)
treed2ab4a00a2dcddc807cf5f1b9d982029f6841410
parentbcc798bcbd84c68838dcd968b23ce32a71dad6fa (diff)
downloadeofirewall-033410319d74fb0a976b05d0508e3b27042111b0.zip
eofirewall-033410319d74fb0a976b05d0508e3b27042111b0.tar.gz
eofirewall-033410319d74fb0a976b05d0508e3b27042111b0.tar.bz2
Update documentation
-rw-r--r--README24
-rwxr-xr-xeofirewall13
2 files changed, 26 insertions, 11 deletions
diff --git a/README b/README
index 6f99ad2..40f0201 100644
--- a/README
+++ b/README
@@ -6,11 +6,21 @@
= Usage =
-First launch test your configuration:
- /etc/init.d/firewall test
-Second save this change (this will load your rules and save it):
- /etc/init.d/firewall save
-You need to use save at least one time.
+First test your rules:
+ eofirewall test
+Then you need to load this new rules:
+ eofirewall start
+Finally you need to save this new rules:
+ eofirewall save
-/etc/init.d/firewall stop: will flush ALL your rules
-/etc/init.d/firewall start|restore: will load your saved rules
+Other options :
+eofirewall clean: this will remove eofirewall rules
+eofirewall flush: this will remove all iptables rules
+eofirewall load|restore: this will load your last saved rules
+
+= Debian =
+
+Debian package provides an init scripts (/etc/init.d/eofirewall)
+
+/etc/init.d/eofirewall start: this will load your last saved rules
+/etc/init.d/eofirewall stop: this will clean eofirewall rules
diff --git a/eofirewall b/eofirewall
index fc90561..52047c1 100755
--- a/eofirewall
+++ b/eofirewall
@@ -345,7 +345,8 @@ start()
load()
{
- log_daemon_msg "Loading rules from /etc/network/iptables-save"
+ log_daemon_msg "Loading old rules from /etc/network/iptables-save"
+ log_daemon_msg "If you want to load new rules please use test and then start"
if [ -f /etc/network/iptables-save ]; then
iptables-restore < /etc/network/iptables-save
else
@@ -380,10 +381,14 @@ case "$1" in
test)
test_rules || exit 1
;;
- save)
- log_daemon_msg "Loading new rules"
+ start)
+ log_daemon_msg "WARNING: you are loading new rules you have 5 seconds to cancel (CRTL+C)"
+ sleep 5
start || exit 1
- log_daemon_msg "Saving new rules to /etc/network/iptables-save"
+ ;;
+ save)
+ log_daemon_msg "You need to make a start before if you want to save new rules"
+ log_daemon_msg "Saving current rules to /etc/network/iptables-save"
iptables-save > /etc/network/iptables-save
;;
flush)