detabification
darcs-hash:20051012204422-4ec08-a114321b9bceb677f82ee5f6bae38624b59526a2.gz
This commit is contained in:
parent
232abb13c1
commit
238d80befa
1 changed files with 10 additions and 10 deletions
|
@ -122,9 +122,9 @@ class firewall_crans :
|
||||||
|
|
||||||
def __del__(self) :
|
def __del__(self) :
|
||||||
""" Destruction du lock """
|
""" Destruction du lock """
|
||||||
# Comprend pas pourquoi il faut réimporter ici -- Fred
|
# Comprend pas pourquoi il faut réimporter ici -- Fred
|
||||||
from lock import remove_lock
|
from lock import remove_lock
|
||||||
remove_lock('firewall')
|
remove_lock('firewall')
|
||||||
|
|
||||||
def nat_table(self) :
|
def nat_table(self) :
|
||||||
""" Remplit la table nat """
|
""" Remplit la table nat """
|
||||||
|
@ -750,16 +750,16 @@ class firewall_zamok(firewall_crans) :
|
||||||
|
|
||||||
# LDAP et DNS toujours joignable
|
# LDAP et DNS toujours joignable
|
||||||
iptables("-A SERV_OUT_ADM -p tcp --dport ldap -j ACCEPT")
|
iptables("-A SERV_OUT_ADM -p tcp --dport ldap -j ACCEPT")
|
||||||
iptables("-A SERV_OUT_ADM -p tcp --dport domain -j ACCEPT")
|
iptables("-A SERV_OUT_ADM -p tcp --dport domain -j ACCEPT")
|
||||||
iptables("-A SERV_OUT_ADM -p udp --dport domain -j ACCEPT")
|
iptables("-A SERV_OUT_ADM -p udp --dport domain -j ACCEPT")
|
||||||
|
|
||||||
# Pour le nfs (le paquet à laisser passer n'a pas d'owner)
|
# Pour le nfs (le paquet à laisser passer n'a pas d'owner)
|
||||||
iptables("-A SERV_OUT_ADM -d nfs.adm.crans.org -m owner ! --uid-owner 0 -j REJECT --reject-with icmp-net-prohibited")
|
iptables("-A SERV_OUT_ADM -d nfs.adm.crans.org -m owner ! --uid-owner 0 -j REJECT --reject-with icmp-net-prohibited")
|
||||||
iptables("-A SERV_OUT_ADM -d nfs.adm.crans.org -j ACCEPT")
|
iptables("-A SERV_OUT_ADM -d nfs.adm.crans.org -j ACCEPT")
|
||||||
|
|
||||||
# Rien d'autre ne passe
|
# Rien d'autre ne passe
|
||||||
iptables("-A SERV_OUT_ADM -j REJECT --reject-with icmp-net-prohibited")
|
iptables("-A SERV_OUT_ADM -j REJECT --reject-with icmp-net-prohibited")
|
||||||
|
|
||||||
self.anim.reinit()
|
self.anim.reinit()
|
||||||
print OK
|
print OK
|
||||||
|
|
||||||
|
@ -897,9 +897,9 @@ if __name__ == '__main__' :
|
||||||
fw = eval('firewall_%s()' % hostname)
|
fw = eval('firewall_%s()' % hostname)
|
||||||
chaines = []
|
chaines = []
|
||||||
for nom in dir(fw) :
|
for nom in dir(fw) :
|
||||||
if nom in [ 'log_chaines' , 'test_virus_flood', 'reseaux_non_routables', 'test_mac_ip' , 'blacklist' , 'ext_vers_serveurs' , 'serveurs_vers_ext', 'ext_vers_crans', 'crans_vers_ext' , 'filtre_p2p', 'admin_vlan' , 'serv_out_adm'] :
|
if nom in [ 'log_chaines' , 'test_virus_flood', 'reseaux_non_routables', 'test_mac_ip' , 'blacklist' , 'ext_vers_serveurs' , 'serveurs_vers_ext', 'ext_vers_crans', 'crans_vers_ext' , 'filtre_p2p', 'admin_vlan' , 'serv_out_adm'] :
|
||||||
chaines.append(nom)
|
chaines.append(nom)
|
||||||
|
|
||||||
def __usage(txt=None) :
|
def __usage(txt=None) :
|
||||||
if txt!=None : cprint(txt,'gras')
|
if txt!=None : cprint(txt,'gras')
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue