[firewall_new] len(NETs['fil'])>1

This commit is contained in:
Valentin Samir 2013-03-14 17:29:18 +01:00
parent ceeaa7525f
commit d668fd6fdc

View file

@ -555,9 +555,13 @@ class firewall_komaz(firewall_crans) :
#~ iptables("-t mangle -A PREROUTING -m mark --mark %s -j ACCEPT" % #~ iptables("-t mangle -A PREROUTING -m mark --mark %s -j ACCEPT" %
#~ conf_fw.mark['proxy']) #~ conf_fw.mark['proxy'])
iptables("-t mangle -N BLACKLIST_SOFT") iptables("-t mangle -N BLACKLIST_SOFT")
for ip_fil in NETs['fil']:
iptables("-t mangle -A PREROUTING -p tcp --destination-port 80 " iptables("-t mangle -A PREROUTING -p tcp --destination-port 80 "
"-s %s -d ! %s -j BLACKLIST_SOFT" % "-s %s -d ! %s -j BLACKLIST_SOFT" %
(NETs['fil'][0], NETs['wifi'][0])) (ip_fil, NETs['wifi'][0]))
iptables("-t mangle -A PREROUTING -p tcp --destination-port 80 "
"-s %s -d ! %s -j BLACKLIST_SOFT" %
(NETs['wifi'][0], '138.231.136.0/21'))
iptables("-t mangle -A PREROUTING -m mark --mark %s -j ACCEPT" % conf_fw.mark['proxy']) iptables("-t mangle -A PREROUTING -m mark --mark %s -j ACCEPT" % conf_fw.mark['proxy'])