[./gestion/gen_confs/firewall.py] Le NAT marche mieux avec de l'ip forwarding ...

darcs-hash:20090630231808-8fbb1-788078b9582f1e5d979cffdb7e7d3d56f6becff9.gz
This commit is contained in:
Olivier Huber 2009-07-01 01:18:08 +02:00
parent 5a6c8b91a7
commit 77aa3da3ac

View file

@ -1242,6 +1242,21 @@ class firewall_sable(firewall_rouge):
tc("qdisc add dev %s root htb" % if_radin) tc("qdisc add dev %s root htb" % if_radin)
tc("class add dev %s root htb rate %d ceil %d" % (if_radin, debit_max_radin, debit_max_radin)) tc("class add dev %s root htb rate %d ceil %d" % (if_radin, debit_max_radin, debit_max_radin))
def post_start_hook(self) :
self.anim = anim("\tMise en place du routage")
warn = ''
for cmd in [ 'echo 1 > /proc/sys/net/ipv4/ip_forward' ,
'echo 65536 > /proc/sys/net/ipv4/netfilter/ip_conntrack_max' ] :
status,output=getstatusoutput(cmd)
if status :
warn += output + '\n'
if warn :
print WARNING
if self.debug :
print warn
else :
print OK
firewall_bleu = firewall_zamok firewall_bleu = firewall_zamok
if __name__ == '__main__' : if __name__ == '__main__' :