From f1d6b8a9d3c06f74e904959887cf043d09aff687 Mon Sep 17 00:00:00 2001 From: Dexter Morgan Date: Thu, 2 Jun 2011 20:51:50 +0000 Subject: Branch for updates --- firewall_wizard/scripts/compute_level_name.sh | 147 ++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100755 firewall_wizard/scripts/compute_level_name.sh (limited to 'firewall_wizard/scripts/compute_level_name.sh') 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 +# 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 -- cgit v1.2.1