From: Casey Scott <casey@phantombsd.org>
To: Rob Sterenborg <rob@sterenborg.info>
Cc: netfilter@vger.kernel.org
Subject: Re: verifying set-mark
Date: Fri, 22 Feb 2008 12:53:16 -0800 (PST) [thread overview]
Message-ID: <11716099.121203713596498.JavaMail.root@tomcat.phantombsd.org> (raw)
In-Reply-To: <005301c87593$b13f0a00$13bd1e00$@info>
Good suggestion. Tried just tried that. Traffic gets logged, but
the mark is not set. E.g. (from dump)
Feb 22 12:50:52 tomcat kernel: IN= OUT=eth0 SRC=66.93.87.2
DST=192.168.1.7 LEN=1500 TOS=0x00 PREC=0x20 TTL=54 ID=4397
DF PROTO=TCP SPT=80 DPT=4322 WINDOW=17520 RES=0x00 ACK URGP=0
Feb 22 12:50:52 tomcat kernel: IN=eth0 OUT=eth1 SRC=192.168.1.7
DST=66.93.87.2 LEN=40 TOS=0x00 PREC=0x00 TTL=127 ID=18031 DF
PROTO=TCP SPT=4322 DPT=80 WINDOW=64240 RES=0x00 ACK URGP=0
Feb 22 12:50:52 tomcat kernel: IN= OUT=eth0 SRC=66.93.87.2
DST=192.168.1.7 LEN=1500 TOS=0x00 PREC=0x20 TTL=54 ID=4398
DF PROTO=TCP SPT=80 DPT=4322 WINDOW=17520 RES=0x00 ACK URGP=0
Notice all the TOS is still 0x00. I am setting marks to 3 or 4
depending on traffic type.
Casey
----- "Rob Sterenborg" <rob@sterenborg.info> wrote:
> > How can I detemine whether or not a iptables set-mark operation
> > is working? iptables -t mangle -nvL shows packets matching the
> > rules with the set-mark. However, with a tcpdump -vvv -i
> > <interface>
> > I can not see the mark. I am looking at the tos field, and I
> > don't see a tos field matching the marks I am trying to set.
>
> Did you try to match the mark in a subsequent rule and LOG the packet
> when the rule hits?
> See also man iptables:
>
> mark
> This module matches the netfilter mark field associated with a packet
> (which can be set using the MARK target below).
> --mark value[/mask] Matches packets with the given unsigned mark value
> (if a mask is specified, this is logically ANDed with the mask before
> the comparison).
>
>
> Grts,
> Rob
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe netfilter"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-02-22 20:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-22 20:14 verifying set-mark Casey Scott
2008-02-22 20:44 ` Rob Sterenborg
2008-02-22 20:53 ` Casey Scott [this message]
2008-02-22 21:44 ` Matt Zagrabelny
2008-02-22 22:40 ` Casey Scott
2008-02-22 22:49 ` Matt Zagrabelny
2008-02-23 18:14 ` Casey Scott
2008-02-23 19:23 ` Rob Sterenborg
[not found] <15675295.211203870881109.JavaMail.root@tomcat.phantombsd.org>
2008-02-24 16:36 ` Casey Scott
2008-02-24 17:30 ` Martijn Lievaart
2008-02-24 17:34 ` Casey Scott
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=11716099.121203713596498.JavaMail.root@tomcat.phantombsd.org \
--to=casey@phantombsd.org \
--cc=netfilter@vger.kernel.org \
--cc=rob@sterenborg.info \
/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.