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

View File

@ -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

View File

@ -345,7 +345,8 @@ start()
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
@ -380,10 +381,14 @@ case "$1" in
test_rules || exit 1
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
log_daemon_msg "Saving new rules to /etc/network/iptables-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