From: Vinod Chandran <vinod_chandran@multitech.co.in>
To: Omar Garcia <omar.garcia@fractalia.biz>
Cc: netfilter@lists.netfilter.org
Subject: Re: Differences between -j MARK and -j CONNMARK
Date: Fri, 11 Feb 2005 15:35:36 +0530 [thread overview]
Message-ID: <420C8370.5030408@multitech.co.in> (raw)
In-Reply-To: <009f01c5101f$6302ddd0$910010ac@coco>
Hi,
As far as I know,CONNMARK sets the mark value of the connection tracking
entry, while MARK sets the mark value of the packet.
Omar Garcia wrote:
>Hi list,
>
>What`s the differences between these two groups of rules.?????
>In the first i use MARK --set-mark to mark packets and in the other i use CONNMARK --set-mark
>
>1.
> # iptables -I POSTROUTING -t mangle -j CONNMARK --restore-mark
> # iptables -I POSTROUTING -t mangle -m mark ! --mark 0 -j ACCEPT
> # iptables -I POSTROUTING -t mangle -m ipp2p --ipp2p -j MARK --set-mark 30
> # iptables -I POSTROUTING -t mangle -m ipp2p --bit -j MARK --set-mark 30
> # iptables -I POSTROUTING -t mangle -j CONNMARK --save-mark
> >>>> Here u are changing the mark value of the packet while the mark value of the connection track entry remains the same. The mark value is applicable to the current packet.
>
>
>2.
> # iptables -I POSTROUTING -t mangle -j CONNMARK --restore-mark
> # iptables -I POSTROUTING -t mangle -m mark ! --mark 0 -j ACCEPT
> # iptables -I POSTROUTING -t mangle -m ipp2p --ipp2p -j CONNMARK --set-mark 30
> # iptables -I POSTROUTING -t mangle -m ipp2p --bit -j CONNMARK --set-mark 30
> # iptables -I POSTROUTING -t mangle -j CONNMARK --save-mark
>
>>>>> Here the mark value of the conntrack is changed, which is applied to the next packet ownwards.
>
>
>Regards.
>Thanks
>
>
>
Enjoi,
Vinod
next prev parent reply other threads:[~2005-02-11 10:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-11 9:52 Differences between -j MARK and -j CONNMARK Omar Garcia
2005-02-11 10:05 ` Vinod Chandran [this message]
2005-02-11 12:40 ` Jason Opperisano
2005-02-11 12:59 ` Omar Garcia
2005-02-20 23:33 ` Ian! D. Allen
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=420C8370.5030408@multitech.co.in \
--to=vinod_chandran@multitech.co.in \
--cc=netfilter@lists.netfilter.org \
--cc=omar.garcia@fractalia.biz \
/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.