From: Padmanabhan <rpdumps@gmail.com>
To: netfilter@vger.kernel.org
Subject: Re: iptables u32 tests and user logging
Date: Mon, 21 Jul 2008 11:41:29 -0500 [thread overview]
Message-ID: <76fdae320807210941p39dc17b6i1e4e3e75592c7b6b@mail.gmail.com> (raw)
In-Reply-To: <4884ADDC.7000600@riverviewtech.net>
Hello, Jan,
I came up with following u32 rule ,,should I not multiply by 4 for
TCP header length to get the offset , as we do for the IP header ?
iptables -m u32 --u32 " 0>>22&0x3C@12>>26&0x3C@0&0xFF000000=0x01
&&
0>>22&0x3C@12>>26&0x3C@16=0x00000000:0xFFFFFFFF" -j ulog
for TOS bits set packet, I am inspecting first byte of TCP payload and
if that matches, need to record/log value from 16-19 in the TCP
payload. Since a test has to be made, i just compared those byte value
to be in the range of all 0's to all FF's.. which obviously it would
be ...So, with this test done, the action I would like to do is log
those four byte value .
1. My requirement is as stated by Grant, just need to log those four
bytes ( ITT value) from the iscsi header. Is there any options in
linux space ? With u32 I came so close, yet it was not able to fulfill
it.
2. I tried ulog, to provide a option to log interested bytes,, Will cp
range provide first few bytes of the packet say 100 bytes ?
Can i use this option instead of 0 ? ( caution in the man page says to
leave it to 0)
Thanks again ,,
Padmanabhan
next prev parent reply other threads:[~2008-07-21 16:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <76fdae320807202313ma67d4c3l1921e41fa962a976@mail.gmail.com>
2008-07-21 6:15 ` iptables u32 tests and user logging Padmanabhan
2008-07-21 7:51 ` Jan Engelhardt
2008-07-21 15:40 ` Grant Taylor
2008-07-21 16:41 ` Padmanabhan [this message]
2008-07-21 16:49 ` Jan Engelhardt
2008-07-21 18:06 ` Padmanabhan
2008-07-21 18:49 ` Jan Engelhardt
2008-07-21 19:57 ` Grant Taylor
2008-07-21 20:15 ` Padmanabhan
2008-07-21 21:52 ` Grant Taylor
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=76fdae320807210941p39dc17b6i1e4e3e75592c7b6b@mail.gmail.com \
--to=rpdumps@gmail.com \
--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