All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aleksei Bebinov <alex@gipi.kg>
To: netfilter@vger.kernel.org
Subject: multiple exclusive DNAT does not work
Date: Sat, 27 Dec 2008 00:45:38 +0600	[thread overview]
Message-ID: <49552652.1040705@gipi.kg> (raw)
In-Reply-To: <S1751268AbYLZSRi/20081226181738Z+155@vger.kernel.org>

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


       reply	other threads:[~2008-12-26 18:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <S1751268AbYLZSRi/20081226181738Z+155@vger.kernel.org>
2008-12-26 18:45 ` Aleksei Bebinov [this message]
2008-12-26 18:57   ` multiple exclusive DNAT does not work Leonardo Rodrigues Magalhães
2008-12-27  8:19     ` Aleksei Bebinov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49552652.1040705@gipi.kg \
    --to=alex@gipi.kg \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.