From: Joel Newkirk <netfilter@newkirk.us>
To: COUSIN Marc <mcousin@sigma.fr>,
"'netfilter@lists.netfilter.org'" <netfilter@lists.netfilter.org>
Subject: Re: Marking and Mangling for QoS
Date: Mon, 25 Nov 2002 08:50:00 -0500 [thread overview]
Message-ID: <200211250850.00977.netfilter@newkirk.us> (raw)
In-Reply-To: <B5D7C6B6D020D511838A0060082D4CC90299BBF7@kheops.sigma.fr>
On Monday 25 November 2002 05:24 am, COUSIN Marc wrote:
> Hi,
> I'm having trouve using mangling on NATed packets:
> # For the NAT
> iptables -t nat -A PREROUTING -p tcp --destination-port 8081:8090 -j DNAT
> --to-destination 89.131.0.7:8080
> iptables -t nat -A POSTROUTING -p tcp --destination 89.131.0.7 -j SNAT
> --to-source 89.131.0.58
> # For the marks
> iptables -A PREROUTING -t mangle -p tcp --destination-port 8081 -j MARK
> --set-mark 10
> iptables -A POSTROUTING -t mangle -p tcp --source-port 8081 -j MARK
> --set-mark 11 # Trying to match the return NATed packet
>
>
> The --set-mark 10 works (no surprise, very simple rule in fact)
> the --set-mark 11 doesn't match. It may be normal, as I'm trying to match a
> return packet on a NAT connexion. How am I supposed to match the return
> packet in such a situation ?
Try putting it in PREROUTING instead of POSTROUTING. PREROUTING is for
packets as they enter the firewall, regardless of the direction they are
travelling. POSTROUTING is just before it leaves the firewall.
j
prev parent reply other threads:[~2002-11-25 13:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-25 10:24 Marking and Mangling for QoS COUSIN Marc
2002-11-25 10:29 ` Unknown, Raymond Leach
2002-11-25 10:45 ` router protection with iptables Remus
2002-11-26 8:04 ` Joel Newkirk
2002-11-25 13:50 ` Joel Newkirk [this message]
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=200211250850.00977.netfilter@newkirk.us \
--to=netfilter@newkirk.us \
--cc=mcousin@sigma.fr \
--cc=netfilter@lists.netfilter.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.