From 033410319d74fb0a976b05d0508e3b27042111b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Schneider?= Date: Fri, 15 Nov 2013 11:21:15 +0100 Subject: [PATCH] Update documentation --- README | 24 +++++++++++++++++------- eofirewall | 13 +++++++++---- 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)