From: Julien Vehent <julien@linuxwall.info>
To: netfilter@vger.kernel.org
Subject: Re: tc and traffic established,related
Date: Tue, 21 Jul 2009 17:48:05 +0200 [thread overview]
Message-ID: <81f25297b8a23e5779e4d983332f41bc@localhost> (raw)
In-Reply-To: <4A65DC4D.1030402@plouf.fr.eu.org>
On Tue, 21 Jul 2009 17:18:37 +0200, Pascal Hambourg
<pascal.mail@plouf.fr.eu.org> wrote:
> Hello,
>
> Fabio Marcone a écrit :
>>
>> I have a linux router and I mark packets from lan to wan and I use a tc
>> class to limit datarate (selecting packets by mark).
>> but how can I recognize answer packets? How can I know is a packet is
>> about a connection previously established?
>
> See the CONNMARK target and the connmark match.
>
>
When you mark a packet, you can propagate this mark to the connexion the
packet is from using the rule:
iptables -t mangle -A OUTPUT -j CONNMARK --restore-mark
And then, the mark will appear in /proc/net/ip_conntrack and all the
packets of this connexion will be marked.
--
julien
http://jve.linuxwall.info/blog
prev parent reply other threads:[~2009-07-21 15:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-21 15:13 tc and traffic established,related Fabio Marcone
2009-07-21 15:18 ` Pascal Hambourg
2009-07-21 15:48 ` Julien Vehent [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=81f25297b8a23e5779e4d983332f41bc@localhost \
--to=julien@linuxwall.info \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox