diff --git a/gestion/gen_confs/firewall6.py b/gestion/gen_confs/firewall6.py index 716114ee..a26ea7c7 100755 --- a/gestion/gen_confs/firewall6.py +++ b/gestion/gen_confs/firewall6.py @@ -26,7 +26,7 @@ sys.path.append('/usr/scripts/gestion') from ldap_crans import hostname from config import conf_fw, mid, prefix, role, file_pickle, open_ports -from config import authorized_icmpv6, mac_wifi +from config import authorized_icmpv6, mac_wifi, adm_only from ipt import * # On invoque Ip6tables @@ -238,6 +238,14 @@ ACCEPT') def start(): ''' Démarre le firewall sur la machine considérée ''' + + # On véifie si le serveur n'est pas que sur le vlan adm. Dans ce cas on ne + # fait rien + + if hostname in adm_only: + print "Rien n'a faire, ce serveur est adm-only" + exit(0) + # On rempli machines global machines machines = db.all_machines(graphic = True) @@ -252,6 +260,10 @@ def start(): # On recherche si la machine a des attributs particuliers. if hostname in role.keys(): + if 'external' in role[hostname]: + print "Il faut encore implémenter un firewall pour les serveurs à \ + l'extérieur du réseau Cr@ns" + exit(0) if 'sniffer' not in role[hostname]: basic_fw() for func in role[hostname]: