Re: At a loss figuring out if an IP is on LAN or INET



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. 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).
.



Relevant Pages

  • Re: peer to peer messaging
    ... attempts to open a connection to port 80 of the server at that IP address. ... For example a packet from my machine might have source IP ... Packets from the sever to my laptop would have those reversed. ...
    (comp.lang.java.programmer)
  • Re: At a loss figuring out if an IP is on LAN or INET
    ... What the server probably wants to check here is whether the IP in the ... packet header matched the IP in the packet data. ... multiple desktop machines behind "true NAT" firewalls. ... computer that just accepted the connection). ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Removing T/TCP and replacing it with something simpler
    ... > globally enabled on the machine and the server supports it too. ... The setsockoptoptimizes packet sending on the server ... >> established TCP connection, but blocks sending data until the ... > will go in one packet on the wire. ...
    (freebsd-arch)
  • Re: asynchronous socket problem when connecting to localhost
    ... You server starts sending right after accepting connection. ... also ensure the packet goes to a correct client. ... it's the last packet I sent. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: 2 SSH questions: why does it pause so much, and, can I keep connection alive?
    ... >I believe the server is behind a firewall. ... When a packet arrives, its source IP, ... then the connection is added to the state table. ... > Iım running OpenSSH 3.6.1 on Mac OSX. ...
    (comp.security.ssh)

Loading