[./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:
parent
5a6c8b91a7
commit
77aa3da3ac
1 changed files with 15 additions and 0 deletions
|
@ -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__' :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue