[./gestion/gen_confs/firewall6.py] les serveurs adm_only n'ont pas besoin de firewall
et ceux à l'extérieur ont aussi une configuration totalement différente darcs-hash:20100704041306-8fbb1-78a115df7e24f45837128f1a2b6f30859af5abd0.gz
This commit is contained in:
parent
9adb5cb8fa
commit
b5159c0c68
1 changed files with 13 additions and 1 deletions
|
@ -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]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue