Re: restrict implicit binding to interfaces
- From: Maxwell Lol <nospam@xxxxxxxxxxx>
- Date: Wed, 29 Oct 2008 23:23:41 -0400
Wolfgang Draxinger <wdraxinger@xxxxxxxxxxxxxxxx> writes:
Allen Kistler wrote:
I think what he's asking is how he can control on what
addresses an app
listener opens a socket. Most apps open sockets on 0.0.0.0
(i.e., every
interface) by default. Some let you specify listening
addresses. He appears to want a way to designate some
interfaces as "restricted" and others as "not restricted" so
that apps open listeners on the "not restricted" interfaces by
default, but can open listeners on the "restricted" interfaces
if their configs specifically request it.
Yes, that's exactly what I want.
Then you will likely have to change the source code of those apps.
It's not hard. Although It was 15 years ago when I did this.
Normally the bind() call uses some constant for one of the parameters.
I think it's INADDR_ANY. (which usually has the value 0x00).
You change this to match the IP address you explicitly want.
So if a device has multiple interfaces, this forces the application to
only listen to the interface specified. If you have an inside network,
and an outside network, you can force the app to listen to one of the
other.
This is uncommon for many apps. Luckily for Linux, the source code is
usually available.
.
- References:
- restrict implicit binding to interfaces
- From: Wolfgang Draxinger
- Re: restrict implicit binding to interfaces
- From: David Schwartz
- Re: restrict implicit binding to interfaces
- From: Allen Kistler
- Re: restrict implicit binding to interfaces
- From: Wolfgang Draxinger
- restrict implicit binding to interfaces
- Prev by Date: Re: restrict implicit binding to interfaces
- Next by Date: Re: BIND -- can't register nameserver
- Previous by thread: Re: restrict implicit binding to interfaces
- Next by thread: Re: restrict implicit binding to interfaces
- Index(es):
Relevant Pages
|