Kaynağa Gözat

User friendly messages added

Laurent HUBERT 10 ay önce
ebeveyn
işleme
05533ea24e
1 değiştirilmiş dosya ile 23 ekleme ve 5 silme
  1. 23 5
      scripts/lfirewall

+ 23 - 5
scripts/lfirewall

@@ -520,19 +520,34 @@ case "$1" in
 		echo "done."
 	;;
 	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"
 		fw_backup_user
 		echo "done."
 	;;
 	stop)
 		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 "###############################################################"
 		fw_stop
 	;;
 	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.."
 		fw_clear
 		echo "done."
@@ -562,9 +577,12 @@ case "$1" in
 	*)
 		echo "Usage: $0 {start|dropall|stop|restart|clear|test}"
 		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 "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
 	;;
 esac