From e32653fea45d6f17f5645fc85c2143ecc18d6900 Mon Sep 17 00:00:00 2001 From: Olivier Huber Date: Fri, 13 Nov 2009 23:19:21 +0100 Subject: [PATCH] [./gestion/gen_confs/firewall.py] Ajout d'une regle pour avoir le proxy transparent avec le wifi darcs-hash:20091113221921-8fbb1-ac5a8367963992532f6d09c7697f6fee3d7fea7f.gz --- gestion/gen_confs/firewall.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gestion/gen_confs/firewall.py b/gestion/gen_confs/firewall.py index c4f70efc..31bc0a48 100644 --- a/gestion/gen_confs/firewall.py +++ b/gestion/gen_confs/firewall.py @@ -1226,7 +1226,7 @@ class firewall_sable(firewall_rouge): def nat_table(self): firewall_rouge.nat_table(self) - # Pour le proxy transparent + # Proxy transparent pour le filiaire iptables("-t nat -I PREROUTING -i eth0.2 -m mark --mark %s -j ACCEPT" % conf_fw.mark['proxy']) if_defaut = "eth0" @@ -1234,6 +1234,11 @@ class firewall_sable(firewall_rouge): if_accueil = "eth0.%d" % vlans["accueil"] if_isolement = "eth0.%d" % vlans["isolement"] + # Proxy transparent pour le wifi + iptables("-t nat -A PREROUTING -i %s -p tcp --dport 80" %if_defaut + + " -d ! 138.231.136.0/24 -j DNAT --to-destination" + + " 138.231.136.9:3128") + # Proxy transparent pour les vlans radin et accueil for interface in [if_radin, if_accueil, if_isolement]: iptables("-t nat -i %s -A PREROUTING -p tcp --destination-port 80 -j DNAT --to-destination 10.51.0.1:3128" % interface)