Update documentation

This commit is contained in:
Jérôme Schneider 2013-11-15 11:21:15 +01:00
parent bcc798bcbd
commit 033410319d
2 changed files with 26 additions and 11 deletions

24
README
View File

@ -6,11 +6,21 @@
= Usage = = Usage =
First launch test your configuration: First test your rules:
/etc/init.d/firewall test eofirewall test
Second save this change (this will load your rules and save it): Then you need to load this new rules:
/etc/init.d/firewall save eofirewall start
You need to use save at least one time. Finally you need to save this new rules:
eofirewall save
/etc/init.d/firewall stop: will flush ALL your rules Other options :
/etc/init.d/firewall start|restore: will load your saved rules 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

View File

@ -345,7 +345,8 @@ start()
load() 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 if [ -f /etc/network/iptables-save ]; then
iptables-restore < /etc/network/iptables-save iptables-restore < /etc/network/iptables-save
else else
@ -380,10 +381,14 @@ case "$1" in
test) test)
test_rules || exit 1 test_rules || exit 1
;; ;;
save) start)
log_daemon_msg "Loading new rules" log_daemon_msg "WARNING: you are loading new rules you have 5 seconds to cancel (CRTL+C)"
sleep 5
start || exit 1 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 iptables-save > /etc/network/iptables-save
;; ;;
flush) flush)