|
@@ -520,19 +520,34 @@ case "$1" in
|
|
|
echo "done."
|
|
echo "done."
|
|
|
;;
|
|
;;
|
|
|
saveuser)
|
|
saveuser)
|
|
|
|
|
+ echo "###############################################################"
|
|
|
|
|
+ echo "# Backing up user rules to /etc/lfirewall/iptables-user.v* #"
|
|
|
|
|
+ echo "# #"
|
|
|
|
|
+ echo "# Other iptables rules should not be removed unless you use #"
|
|
|
|
|
+ echo "# the 'clear' command (which deletes every rule) #"
|
|
|
|
|
+ echo "# If you used the 'clear' command, you can restore them by #"
|
|
|
|
|
+ echo "# using the 'start' command to restore them #"
|
|
|
|
|
+ echo "###############################################################"
|
|
|
echo -n "Backing up rules"
|
|
echo -n "Backing up rules"
|
|
|
fw_backup_user
|
|
fw_backup_user
|
|
|
echo "done."
|
|
echo "done."
|
|
|
;;
|
|
;;
|
|
|
stop)
|
|
stop)
|
|
|
echo "###############################################################"
|
|
echo "###############################################################"
|
|
|
- echo "I do not stop for now."
|
|
|
|
|
- echo "Use 'clear' to remove all firewall blocking rules."
|
|
|
|
|
- echo "Use 'dropall' to stop any traffic and block everything."
|
|
|
|
|
|
|
+ echo "# Removing rules set by this tool #"
|
|
|
|
|
+ echo "# #"
|
|
|
|
|
+ echo "# Other iptables rules should not be removed unless you use #"
|
|
|
|
|
+ echo "# the 'clear' command #"
|
|
|
|
|
+ echo "# Use 'dropall' to stop any traffic and block everything. #"
|
|
|
echo "###############################################################"
|
|
echo "###############################################################"
|
|
|
fw_stop
|
|
fw_stop
|
|
|
;;
|
|
;;
|
|
|
clear)
|
|
clear)
|
|
|
|
|
+ echo "###############################################################"
|
|
|
|
|
+ echo "# Clearing any rule and let the firewall pass any packet #"
|
|
|
|
|
+ echo "# #"
|
|
|
|
|
+ echo "# You can restore them by using the 'start' command #"
|
|
|
|
|
+ echo "###############################################################"
|
|
|
echo -n "Clearing firewall rules.."
|
|
echo -n "Clearing firewall rules.."
|
|
|
fw_clear
|
|
fw_clear
|
|
|
echo "done."
|
|
echo "done."
|
|
@@ -562,9 +577,12 @@ case "$1" in
|
|
|
*)
|
|
*)
|
|
|
echo "Usage: $0 {start|dropall|stop|restart|clear|test}"
|
|
echo "Usage: $0 {start|dropall|stop|restart|clear|test}"
|
|
|
echo "###############################################################"
|
|
echo "###############################################################"
|
|
|
- echo "# Be aware that 'stop' drop all incoming/outgoing traffic !!! #"
|
|
|
|
|
|
|
+ echo "# Be aware that 'dropall' will block #"
|
|
|
|
|
+ echo "# all incoming/outgoing traffic !!! #"
|
|
|
echo "###############################################################"
|
|
echo "###############################################################"
|
|
|
- echo "Use clear option to allow all traffic."
|
|
|
|
|
|
|
+ echo "Use start option to restore all rules."
|
|
|
|
|
+ echo "Use clear option to remove all traffic."
|
|
|
|
|
+ echo "Use stop option to allow all traffic."
|
|
|
exit 1
|
|
exit 1
|
|
|
;;
|
|
;;
|
|
|
esac
|
|
esac
|