From 77aa3da3ac88ff589cd29d1354dc08b033d4f4d3 Mon Sep 17 00:00:00 2001 From: Olivier Huber Date: Wed, 1 Jul 2009 01:18:08 +0200 Subject: [PATCH] [./gestion/gen_confs/firewall.py] Le NAT marche mieux avec de l'ip forwarding ... darcs-hash:20090630231808-8fbb1-788078b9582f1e5d979cffdb7e7d3d56f6becff9.gz --- gestion/gen_confs/firewall.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gestion/gen_confs/firewall.py b/gestion/gen_confs/firewall.py index 0bd4a259..d3b45a39 100644 --- a/gestion/gen_confs/firewall.py +++ b/gestion/gen_confs/firewall.py @@ -1242,6 +1242,21 @@ class firewall_sable(firewall_rouge): 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)) + 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 if __name__ == '__main__' :