From: Anders Fugmann <afu@fugmann.dhs.org>
To: Athan <netfilter@miggy.org>
Cc: Ian Batterbee <ian.batterbee@aut.ac.nz>, netfilter@lists.netfilter.org
Subject: Re: Newbie question about having multiple destination addresses in a chain entry
Date: Sun, 05 Jan 2003 14:13:50 +0100 [thread overview]
Message-ID: <3E182F8E.3090601@fugmann.dhs.org> (raw)
In-Reply-To: <20030105124531.GJ16581@miggy.org>
Athan wrote:
> I *think* your problem is that the NOTHING chain is empty, so at the
> end of it it just returns to the calling chain. Why not just simply -j
> ACCEPT on the rule in PREROUTING? That should stop it processing any
> further down the PREROUTING for packets with that destination.
Besides the solution presented (with the error corrected), a more clean
solution is to create a new chain, and then use the RETURN target in
this chain for packets that are not to be DNAT'ed:
iptables -t mangle -N DNAT_PROXY
iptables -t mangle -A DNAT_PROXY -d 192.168.0.0/24 -j RETURN
iptables -t mangle -A DNAT_PROXY -d x.x.0.0/16 -j RETURN
iptables -t mangle -A DNAT_PROXY -p tcp -j REDIRECT --to-ports 3128
iptables -t mangle -A PREROUTING -p tcp --dport 80 -j DNAT_PROXY
This allows you to do other stuff on packets in PREROUTING, as you are
not accepting packets that are not to be DNAT'ed.
Regards
Anders Fugmann
--
Author of FIAIF
FIAIF Is An Intelligent Firewall
http://fiaif.fugmann.dhs.org
next prev parent reply other threads:[~2003-01-05 13:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-05 11:39 Newbie question about having multiple destination addresses in a chain entry Ian Batterbee
2003-01-05 12:45 ` Athan
2003-01-05 13:13 ` Anders Fugmann [this message]
[not found] ` <3E183111.8090504@aut.ac.nz>
2003-01-05 13:28 ` Anders Fugmann
2003-01-05 12:54 ` Ian Batterbee
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=3E182F8E.3090601@fugmann.dhs.org \
--to=afu@fugmann.dhs.org \
--cc=ian.batterbee@aut.ac.nz \
--cc=netfilter@lists.netfilter.org \
--cc=netfilter@miggy.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox