comparing two IP addresses and the underlying machine

Ratko Jagodic rjagodic at gmail.com
Tue Dec 12 11:03:13 EST 2006


By the same physical machine I meant one OS using two interfaces and
multiple IP addresses mapped to different interfaces. I figured there
wouldn't be a direct solution to this so each time I will send all IP
addresses to the "match maker" so I can make comparisons and that should
work. Thanks for the help.

Ratko


On 12/12/06, Tim Chase <python.list at tim.thechases.com> wrote:
>
> > I've been trying to figure this one out for some time but
> > with no success.  I have a machine with two network
> > interfaces, each with their own IP address and it's own
> > domain, for example:
> > - ipA on machineA.domainA
> > - ipB on machineB.domainB
> >
> > Given any pair of IPs or hostnames (or a mix of them), how
> > can I figure whether they belong to the same physical
> > machine or not? Of course, this is trivial if my python
> > program is running the given machine but what if a remote
> > machine is trying to figure this out (but that machine has
> > access to both domains/IPs).
> > Appreciate and ideas.
>
>
> I have a feeling that you're trying to attempt the
> impossible.  What do you mean by "the same physical
> machine"?  The same case?  What happens if there are two
> virtual OSes on the machine, each using its own NIC?
>
> Unless you have a client application running on "the
> physical machine" that can respond to queries on each NIC,
> you're pretty much out of luck.  You could write something
> like a "same_ping" program that would listen on both NICs,
> and respond with a "yeah, I'm the same machine"
> confirmation.  There are all sorts of ways to do this,
> depending on how sure you need to be that nobody can spoof
> it...ranging from simple "here's a random number on one IP
> address followed by asking the other IP if it's seen that
> random number before" to having the physical machine sign
> one request on each port and confirm that their signatures
> are the same.
>
> -tkc
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20061212/c34f5550/attachment.html>


More information about the Python-list mailing list