Re: Bind to specify sending NIC on multi-homed computer
- From: "Eugene Gershnik" <gershnik@xxxxxxxxxxx>
- Date: Sun, 11 Sep 2005 22:47:21 -0700
Koji Ishii wrote:
> I found that even if I bind a socket to a local address, packets can
> go out from the other NIC. From the last paragraph of this KB:
> http://support.microsoft.com/kb/175396
> it looks like this is a by design.
>
> But my question is why.
This has been discussed multiple times in this forum. You may want to google
for details. The last thread I can remeber was
http://groups.google.com/group/microsoft.public.win32.programmer.networks/browse_frm/thread/55e9fb74664a553c/aac1ef670dc099d3#aac1ef670dc099d3
> * Bind() is used to be used when dev wants to use a specific NIC. This
> design breaks developers' expectations by experiences.
The expectations are mostly wrong.
> * Because of this design, non-Admin users can send UDP packets with
> their favorite source IP address. Just plug two NICs and assign your
> favorite address to one NIC, then connect the other to Internet or
> Intranet.
If somebody has a physical access to a machine you can forget about
admin/non-admin stuff.
> Isn't this a security probelm with current XP stack?
Not in the way you see it. However I am not sure there isn't some real
security problem hiding in this area.
> * When dev really wants to send packets from a NIC -- in my case, I
> want to seach an UPnP device connected to non-default NIC -- it's
> really hard to achieve.
Yes and no. Technically this is not hard. You just need to change the
routing table. However, I do understand the shortcomings of this. The
problem is that Windows lumps two distinct thigs together. One is a "general
purpose network card" which is just any kind of adapter that can be used to
connect to the network. Another is "special smart [possibly virtual]
card-like device" used by a single application for its own purposes. The
general purpose cards really should be managed by an admin *not* application
and Windows does it right. The problem is that the same model is used for
special cards and there is AFAIK no easy way to change this fact.
--
Eugene
http://www.gershnik.com
.
- Follow-Ups:
- Re: Bind to specify sending NIC on multi-homed computer
- From: Koji Ishii
- Re: Bind to specify sending NIC on multi-homed computer
- References:
- Bind to specify sending NIC on multi-homed computer
- From: Koji Ishii
- Bind to specify sending NIC on multi-homed computer
- Prev by Date: urgent..to connect to port 80 plz help
- Next by Date: Re: urgent..to connect to port 80 plz help
- Previous by thread: Bind to specify sending NIC on multi-homed computer
- Next by thread: Re: Bind to specify sending NIC on multi-homed computer
- Index(es):
Relevant Pages
|
Loading