From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: netfilter@lists.netfilter.org
Subject: Re: Natted packets
Date: Tue, 09 Jan 2007 11:13:51 +0100 [thread overview]
Message-ID: <45A36ADF.1090506@netfilter.org> (raw)
In-Reply-To: <Pine.LNX.4.61.0701082259240.23737@yvahk01.tjqt.qr>
Jan Engelhardt wrote:
>> Is it possible to know if a packet passing through my router is (s)natted?
>
> I think `-m conntrack --ctstate SNAT` should do that.
>
>> And the original (s)natted IP?
>
> For userspace there's a getsockopt() call that you can use to find out.
That getsockopt() interface is deprecated. If you're in userspace,
better use the libnetfilter_conntrack library. It has a function to
check if a conntrack has been snatted.
--
The dawn of the fourth age of Linux firewalling is coming; a time of
great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris
next prev parent reply other threads:[~2007-01-09 10:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-08 21:43 Natted packets Lucas Diaz
2007-01-08 22:00 ` Jan Engelhardt
2007-01-09 10:13 ` Pablo Neira Ayuso [this message]
2007-01-09 3:06 ` Grant Taylor
2007-01-09 11:58 ` Lucas Diaz
2007-01-13 5:38 ` Grant Taylor
2007-01-15 5:38 ` 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=45A36ADF.1090506@netfilter.org \
--to=pablo@netfilter.org \
--cc=jengelh@linux01.gwdg.de \
--cc=netfilter@lists.netfilter.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