Re: Pretending to be a network node



Hi,

I have a program P that connects on eth0, it sends and receives packets
from the network on that interface. I want to make another program that
pretends to be on the eth0 network, but it's actually on the same
machine as P. Is there a way to do that?

I was thinking maybe there's a way of creating a new interface, say
eth1, and somehow connect it to eth0 in a way that eth0 thinks it's
getting messages from the network, when in fact it's getting messages
from another interface in the same computer. That way I'd be able to
listen to the same udp port on both interfaces and stabilish a two-way
connection between two programs, one connected to eth0 and another
connected to eth1.

I'm using Debian Linux, so system-specific solutions are ok. I'm
interested in knowing solutions for this problem that will work in other
unix systems as well (or even non-unix systems).

Bind to the loopback interface (127.0.0.1). That's what it's for...

Of course, it the second program is a IP client then it won't be binding to any ports anyway. So, in the sameway that you can do "ssh mymachine" or "ssh localhost" you should be able to connect to your server, P, without any special configuration.

What are you trying to do with the second program?



Regards,
@ndy

--
andyjpb@xxxxxxxxxxxxxx
http://www.ashurst.eu.org/
.



Relevant Pages

  • Re: netsh
    ... I have a two computer network at home. ... connection with the network. ... > netsh interface show interface ...
    (microsoft.public.windowsxp.general)
  • Re: netsh
    ... > I have a two computer network at home. ... > connection with the network. ... >> netsh interface show interface ...
    (microsoft.public.windowsxp.general)
  • Re: netsh
    ... >> I have a two computer network at home. ... >> connection with the network. ... >>> netsh interface show interface ...
    (microsoft.public.windowsxp.general)
  • Re: Zeroconfig and Multicast DNS
    ... MacOS X has the notion of interface priorities; ... When the network media indicates that it has been connected, ... the connection is restored before that time, ... > attached to a separate interface. ...
    (freebsd-net)
  • Re: netsh
    ... > I have a two computer network at home. ... > connection with the network. ... >> netsh interface show interface ...
    (microsoft.public.windowsxp.general)