multiple exclusive DNAT does not work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,
tinkering with OpenWRT router ( Kamikaze 7.09) and need so finctionality :
1. all the web traffic thet flow throw router and masquerading have to
be forwarded to external proxy
2.but i have 22 subnets of my local ISPs that have to flow directly
without proxyng.

I do so :
---------------
cat /etc/config/kg-nets | while read LINE
do
#iptables -t nat -A PREROUTING -i br-lan -d  !  $LINE -p tcp -m
multiport --dports  80 -j DNAT --to-destination pr.oxy.ip:3128

done
--------------------------------------------

My script cat the file line by line and add excluding rules ( with ! )
of nets that i dont need to redirect.
BUT!
if only one rule ( for one subnet) persist in table - it works fine, and
if i ll add second  - with second net -  all the traffic redirecting to
proxy - without any  exclusions.

i cant understand  why ?
Could somebody help me please ?

Thanks in advance,
Aleksei

--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux