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



On 2006-04-29, Chris Chilvers <keeper@xxxxxxxxxxx> wrote:
This gets into what I mentioned before, the complications of adding a
server host to the two clients. I'm not entirely sure the OP needs
this, although it's an interesting problem.

Not knowing the particular problem I just thought you may be trying this
as some sort of speed optimisation. If the two computers are on the same
subnet try sending using internal ip's (like MSN). For this you could:
* query both clients for internal ip/subnet, and client A for port X to
connect to
* mask ips and compare. If equal you can now send to each client,
internal ip and external ip (and to client B, port X from A)

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.


* the sever tells client A to expect a connection from A's internal or
external ip (probaly want to have A send some sort of random key to the
server that can be sent to B)
* client B can now try to connect on the internal ip, if that fails it
could retry the external ip (and the first thing it needs to send is
that secrect key or A or A will close the connection)





Along with all this automatic discovery you could allow power users to
decide they really do know better and have a config somewhere, where
they can set what IP address to send to the server. This gives us two
types of IP sent from the client to the server; internal IP/subnet, and
forced IP (no subnet as we're now telling the server to always use this
IP, should disregard the external IP unless this is some sort of
automate regular connection which could result in a DDOS if misused)
.



Relevant Pages

  • [REVS] Backdoor Spotcom Analysis
    ... Spotcom is a backdoor client application that allows a hacker to control ... The server IP address is hard-coded in ... msrsvp.exe accepts a couple of command line arguments. ... the packet payload. ...
    (Securiteam)
  • RE: SBS client updates over WAN remote sites
    ... User Wizard for the remote users on the SBS 2003 server, ... client applications such as Internet Explorer 6.0, Microsoft Office Outlook ... You can apply the following software on the subnet 10.0.2.0 using Group ...
    (microsoft.public.windows.server.sbs)
  • Re: Socket weirdness
    ... client) before you will notice a shutdown receive at server. ... Then eventually a packet comes from the peer, and that will contain data, so the server responds RST: ... way back across the network. ...
    (microsoft.public.dotnet.framework)
  • Re: VPN routing - single NIC - SOLVED
    ... What should happen is that the server ... acts as a proxy for the remote client. ... idea is to put the remotes in their own IP subnet and route this subnet ... Nothing is configured in RAS Admin - No policy and no Static Route. ...
    (microsoft.public.windows.server.networking)
  • Re: What doesnt lend itself to OO?
    ... >> proxy and instructs the server to constuct the real object. ... rather than client code. ... If 'clock' is instantiated in the server, ... > for the server interface at the OOA level. ...
    (comp.object)