summaryrefslogtreecommitdiffstats
path: root/firewall_wizard/scripts/compute_level_name.sh
diff options
context:
space:
mode:
Diffstat (limited to 'firewall_wizard/scripts/compute_level_name.sh')
-rwxr-xr-xfirewall_wizard/scripts/compute_level_name.sh147
1 files changed, 147 insertions, 0 deletions
diff --git a/firewall_wizard/scripts/compute_level_name.sh b/firewall_wizard/scripts/compute_level_name.sh
new file mode 100755
index 00000000..578b06f7
--- /dev/null
+++ b/firewall_wizard/scripts/compute_level_name.sh
@@ -0,0 +1,147 @@
+#!/bin/bash
+#
+# Wizard
+#
+# Copyright (C) 2000 Mandrakesoft.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+# See file LICENSE for further informations on licensing terms.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Authors: Jerome Dumonteil, Maurizio De Cecco, Enzo Maggi
+# icons: Helene Durosini <ln@mandrakesoft.com>
+# <corporate@mandrakesoft.com> http://www.mandrakesoft.com
+
+
+# firewall protection level
+#
+#- level 0 : no protection
+#
+#- level 1 : light filtering, usual services opened
+#
+#- level 2 : only 'internet' services
+#
+#- level 3 : strong protection : only out mail & http
+#
+
+[ -z "${wiz_firewall_level}" ] && wiz_firewall_level=0
+[ ${wiz_firewall_level} -le 0 ] && wiz_firewall_level=0
+[ ${wiz_firewall_level} -ge 3 ] && wiz_firewall_level=3
+
+[ -z "$LANG" ] && LANG=en
+
+case "$LANG" in
+
+ fr)
+ case "${wiz_firewall_level}" in
+
+ 0) txt="Aucun - Pas de protection"
+ ;;
+ 1) txt="Faible - Léger filtrage, services standards ouverts"
+ ;;
+ 2) txt="Intermédiaire - Web, ftp et ssh accessibles de l'extérieur"
+ ;;
+ 3) txt="Fort - Invisible de l'extérieur, usage interne limité au web"
+ ;;
+ *) txt="Aucun niveau selectionné ???"
+ ;;
+ esac
+ ;;
+
+ it)
+ case "${wiz_firewall_level}" in
+
+ 0) txt="None - No protection"
+ ;;
+ 1) txt="Low - Light filtering, standard services available"
+ ;;
+ 2) txt="Medium - web, ftp and ssh shown to outside"
+ ;;
+ 3) txt="Strong - no outside visibility, users limited to web"
+ ;;
+ *) txt="No Level protection selected ???"
+ ;;
+ esac
+ ;;
+
+ es)
+ case "${wiz_firewall_level}" in
+
+ 0) txt="None - No protection"
+ ;;
+ 1) txt="Low - Light filtering, standard services available"
+ ;;
+ 2) txt="Medium - web, ftp and ssh shown to outside"
+ ;;
+ 3) txt="Strong - no outside visibility, users limited to web"
+ ;;
+ *) txt="No Level protection selected ???"
+ ;;
+ esac
+ ;;
+
+ de)
+ case "${wiz_firewall_level}" in
+
+ 0) txt="None - No protection"
+ ;;
+ 1) txt="Low - Light filtering, standard services available"
+ ;;
+ 2) txt="Medium - web, ftp and ssh shown to outside"
+ ;;
+ 3) txt="Strong - no outside visibility, users limited to web"
+ ;;
+ *) txt="No Level protection selected ???"
+ ;;
+ esac
+ ;;
+
+ es)
+ case "${wiz_firewall_level}" in
+
+ 0) txt="None - No protection"
+ ;;
+ 1) txt="Low - Light filtering, standard services available"
+ ;;
+ 2) txt="Medium - web, ftp and ssh shown to outside"
+ ;;
+ 3) txt="Strong - no outside visibility, users limited to web"
+ ;;
+ *) txt="No Level protection selected ???"
+ ;;
+ esac
+ ;;
+
+ *)
+ case "${wiz_firewall_level}" in
+
+ 0) txt="None - No protection"
+ ;;
+ 1) txt="Low - Light filtering, standard services available"
+ ;;
+ 2) txt="Medium - web, ftp and ssh shown to outside"
+ ;;
+ 3) txt="Strong - no outside visibility, users limited to web"
+ ;;
+ *) txt="No Level protection selected ???"
+ ;;
+ esac
+ ;;
+esac
+
+echo_debug "firewall level : ${txt}"
+
+echo $txt
+
+exit 0