Re: Pretending to be a network node
- From: Andy Bennett <andyjpb@xxxxxxxxxxxxxx>
- Date: Fri, 08 Jun 2007 15:42:12 +0100
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/
.
- References:
- Pretending to be a network node
- From: Rafael Almeida
- Re: Pretending to be a network node
- From: Andy Bennett
- Pretending to be a network node
- Prev by Date: Re: Pretending to be a network node
- Next by Date: Re: .xsession not being run
- Previous by thread: Re: Pretending to be a network node
- Next by thread: Re: .xsession not being run
- Index(es):
Relevant Pages
|
|