From d668fd6fdca675aceced1024e9993e58d0cec628 Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Thu, 14 Mar 2013 17:29:18 +0100 Subject: [PATCH] [firewall_new] len(NETs['fil'])>1 --- gestion/gen_confs/firewall_new.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gestion/gen_confs/firewall_new.py b/gestion/gen_confs/firewall_new.py index 463280b1..52e68d4c 100755 --- a/gestion/gen_confs/firewall_new.py +++ b/gestion/gen_confs/firewall_new.py @@ -555,9 +555,13 @@ class firewall_komaz(firewall_crans) : #~ iptables("-t mangle -A PREROUTING -m mark --mark %s -j ACCEPT" % #~ conf_fw.mark['proxy']) iptables("-t mangle -N BLACKLIST_SOFT") + for ip_fil in NETs['fil']: + iptables("-t mangle -A PREROUTING -p tcp --destination-port 80 " + "-s %s -d ! %s -j BLACKLIST_SOFT" % + (ip_fil, NETs['wifi'][0])) iptables("-t mangle -A PREROUTING -p tcp --destination-port 80 " "-s %s -d ! %s -j BLACKLIST_SOFT" % - (NETs['fil'][0], NETs['wifi'][0])) + (NETs['wifi'][0], '138.231.136.0/21')) iptables("-t mangle -A PREROUTING -m mark --mark %s -j ACCEPT" % conf_fw.mark['proxy'])