Re: At a loss figuring out if an IP is on LAN or INET
- From: david <david@xxxxxxxxxxxxxxxx>
- Date: Sun, 30 Apr 2006 01:26:30 -0700
On 2006-04-30, Chris Chilvers <keeper@xxxxxxxxxxx> wrote:
On Sat, 29 Apr 2006 09:25:55 -0700, david <david@xxxxxxxxxxxxxxxx>
wrote:
I still don't see how using the subnet mask helps anything here. The
fact that two ip addresses are on different subnets doesn't tell you
whether to use the internal IP or the external IP.
What the server probably wants to check here is whether the IP in the
packet header matched the IP in the packet data. That would tell you
whether the packet was NATted, which is what you really want to know.
You might also want to check whether hosts A and B had the same external
IP both in the packet data and the packet header, which would let you
identify situations where A and B are local to each other but remote
from the server.
I originaly thought about that, but then I thought about the fact that
the NAT we think about of multiple machines sharing the same IP is in
fact NAPT, whilst true NAT means that each machine could have a
different external IP whilst all being on the same internal network.
True, though in practice I think it would be awfully rare to have
multiple desktop machines behind "true NAT" firewalls.
The
only work around I could see was to have one client try to talk to the
other client internaly first to see if a connection could be found,
hence the use of the shared secrect. Think about it you probaly want two
shared secrects, one from A and one from B so that they both know they
are talking to the right machine, whilst in my first idea only A knew it
had the right computer, B does not (B could have connected to a random
computer that just accepted the connection).
Agreed.
Ideally you'd also want to handle situations where A can initiate a
connection with B, but B can't initiate a connection with A. But I
suspect this is all getting pretty far afield from the OP's needs, which
I don't think included server registration at all.
.
- References:
- At a loss figuring out if an IP is on LAN or INET
- From: Terry Olsen
- Re: At a loss figuring out if an IP is on LAN or INET
- From: david
- Re: At a loss figuring out if an IP is on LAN or INET
- From: Terry Olsen
- Re: At a loss figuring out if an IP is on LAN or INET
- From: david
- Re: At a loss figuring out if an IP is on LAN or INET
- From: Terry Olsen
- Re: At a loss figuring out if an IP is on LAN or INET
- From: Chris Chilvers
- Re: At a loss figuring out if an IP is on LAN or INET
- From: Chris Chilvers
- Re: At a loss figuring out if an IP is on LAN or INET
- From: david
- Re: At a loss figuring out if an IP is on LAN or INET
- From: Chris Chilvers
- At a loss figuring out if an IP is on LAN or INET
- Prev by Date: Re: assembly and portable executable
- Next by Date: Re: Control Transparency Issue...
- Previous by thread: Re: At a loss figuring out if an IP is on LAN or INET
- Next by thread: Re: At a loss figuring out if an IP is on LAN or INET
- Index(es):
Relevant Pages
|
|