From: David Madore <david+ml@madore.org>
To: netdev@vger.kernel.org
Cc: Lukas Tribus <luky-37@hotmail.com>
Subject: Re: assigning an entire subnet of addresses to an interface
Date: Sun, 3 Feb 2013 23:00:57 +0100 [thread overview]
Message-ID: <20130203220057.GA14363@achernar.madore.org> (raw)
In-Reply-To: <DUB107-W70CD0C5839AA44142F48CED020@phx.gbl>
On Sun, Feb 03, 2013 at 10:45:45PM +0100, Lukas Tribus wrote:
> The feature you are looking for is called "Transparent proxy support" or
> TPROXY, and is in the kernel since 2.6.28.
>
> This allows an application to bind to any address and handle that traffic.
This is indeed, interesting, and I'm glad you pointed out this
possibility, because it had escaped my radar. (Note that there are
two slightly different things, though: the TPROXY iptables/ip6tables
target which redirects packets to a local socket, and the IP-level
IP_TRANSPARENT socket option which allows a user application to bind
to an arbitrary address. The latter is closer to what I was asking.)
However, this still does not really answer my question: to bind to
127.1.2.3 one does not need to do a prior setsockopt(fd, SOL_IP,
IP_TRANSPARENT, &1), so the kernel does seem to have a way to say "for
this entire subnet, it will be possible to bind to any address without
doing anything special".
Happy hacking,
--
David A. Madore
( http://www.madore.org/~david/ )
next prev parent reply other threads:[~2013-02-03 22:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-03 20:51 assigning an entire subnet of addresses to an interface David Madore
2013-02-03 21:45 ` Lukas Tribus
2013-02-03 22:00 ` David Madore [this message]
2013-02-03 22:35 ` David Madore
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=20130203220057.GA14363@achernar.madore.org \
--to=david+ml@madore.org \
--cc=luky-37@hotmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox