Update documentation
This commit is contained in:
parent
bcc798bcbd
commit
033410319d
24
README
24
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
|
||||
|
|
13
eofirewall
13
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)
|
||||
|
|
Reference in New Issue