From: Rusty Russell <rusty@rustcorp.com.au>
To: Rolf Fokkens <fokkensr@linux06.vertis.nl>
Cc: linux-kernel@vger.kernel.org, kuznet@ms2.inr.ac.ru
Subject: Re: iptables and tcpdump
Date: Tue, 30 Oct 2001 15:28:12 +1100 [thread overview]
Message-ID: <20011030152812.2e9ba8ee.rusty@rustcorp.com.au> (raw)
In-Reply-To: <01102817104101.01788@home01>
In-Reply-To: <01102817104101.01788@home01>
On Sun, 28 Oct 2001 17:10:41 -0800
Rolf Fokkens <fokkensr@linux06.vertis.nl> wrote:
> Hi!
>
> I've been "tcpdumping" traffic that passes through a NAT box based on
> netfilter. Everything works wonderful, but tcpdump presents confusing data.
> With the help of google I found out that tcpdump sees the data right after
> the NF_IP_PRE_ROUTING and the NF_IP_POST_ROUTING hooks. This explains it all,
> but results in a new question: why does tcpdump "see" the data after the
> NF_IP_PRE_ROUTING hook instead of before, which more accurately reflects the
> data that's on the wire?
It should see the packets on the wire (they are grabbed by tcpdump before
IP processing), but IIRC they are cloned (not copied) for tcpdump's use.
Alexey, should the NAT layer be doing skb_unshare() before altering the packet?
> icmp 1 29 src=145.66.17.200 dst=10.13.92.231 ... [UNREPLIED]
> src=130.130.92.231 dst=145.66.17.200 ...
>
> One half shows an unNATted dst, the second half shows the NATted src.
> Logically speaking they should match but now they don't.
No, that's what the connection tracking will actually see. If there is
no NAT, they will match.
Hope that clarifies,
Rusty.
next prev parent reply other threads:[~2001-10-30 5:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-29 1:10 iptables and tcpdump Rolf Fokkens
2001-10-30 4:28 ` Rusty Russell [this message]
2001-10-30 5:31 ` David S. Miller
2001-10-31 5:45 ` Rolf Fokkens
2001-10-31 6:28 ` Rusty Russell
2001-10-31 13:34 ` kuznet
2001-11-06 23:40 ` David S. Miller
2001-10-30 17:31 ` kuznet
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=20011030152812.2e9ba8ee.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=fokkensr@linux06.vertis.nl \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@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