All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michel Lespinasse <walken@zoy.org>
To: netdev@vger.kernel.org
Subject: transparent UDP proxy
Date: Tue, 18 Mar 2008 04:59:45 -0700	[thread overview]
Message-ID: <20080318115945.GC11087@zoy.org> (raw)

Hi,

After redirecting UDP connections to a local port with netfilter (DNAT),
I'm trying to figure out what the original intended destination was.

For TCP sockets, I could just use the SO_ORIGINAL_DST socket option,
but that does not work with UDP (I tried, with a 2.6.22.19 kernel)

I also tried using recvmsg and looking for an IP_PKTINFO control message
as outlined in
http://lists.cistron.nl/pipermail/freeradius-users/2002-March/005600.html
but that did not work either (no anciliary data was ever received).

Is there any way to figure out the original destination IP of a NATed
UDP packet ?

Thanks,

-- 
Michel Lespinasse

                 reply	other threads:[~2008-03-18 12:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20080318115945.GC11087@zoy.org \
    --to=walken@zoy.org \
    --cc=netdev@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 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.