diff --git a/gestion/gen_confs/firewall.py b/gestion/gen_confs/firewall.py index 25185bcf..37674854 100755 --- a/gestion/gen_confs/firewall.py +++ b/gestion/gen_confs/firewall.py @@ -1172,14 +1172,23 @@ class firewall_sable(firewall_rouge): """Comme pour rouge, avec le proxy transparent en plus""" def mangle_table(self): - # Pour le proxy transparent iptables("-t mangle -F PREROUTING") + + # Pour le proxy transparent iptables("-t mangle -i eth0.2 -A PREROUTING -p tcp --destination-port 3128 " + "--destination 10.231.136.9 " + "-m mac --mac-source %s " % mac_komaz + "-j MARK --set-mark %s" % conf_fw.mark['proxy']) iptables("-t mangle -A PREROUTING -m mark --mark %s -j ACCEPT" % conf_fw.mark['proxy']) + # Proxy transparent sur le vlan accueil + iptables("-t nat -i eth0.7 -A PREROUTING -p tcp --destination-port 80 -j DNAT --to-destination 10.51.0.1:3128") + iptables("-t nat -i eth0.7 -A PREROUTING -p tcp --destination-port 3128 -j ACCEPT") + + # Proxy transparent sur le vlan radin + iptables("-t nat -i eth0.6 -A PREROUTING -p tcp --destination-port 80 -j DNAT --to-destination 10.42.0.1:3128") + iptables("-t nat -i eth0.6 -A PREROUTING -p tcp --destination-port 3128 -j ACCEPT") + def nat_table(self): firewall_rouge.nat_table(self) # Pour le proxy transparent