Map non-127.x.x.x address back to own machine?
Darryl Moore
darryl-90a536wCiRb3fQ9qLvQP4Q at public.gmane.org
Wed Sep 14 10:52:00 UTC 2011
On Wed, 2011-09-14 at 07:57 +0300, Ori Idan wrote:
>
>
> On Wed, Sep 14, 2011 at 7:54 AM, Amanda Yilmaz <ayilmaz-e+AXbWqSrlAAvxtiuMwx3w at public.gmane.org>
> wrote:
> Hi all,
>
> Is there a way to make an IP address outside the 127.x.x.x
> range (say, 192.168.56.101) map back to your own machine when
> accessed from your own machine, as if it were another alias
> for localhost? I'd like this to happen only on my own machine,
> and not interfere with anyone else's use of said IP address on
> the local network. This is for testing purposes only.
>
> I've been poring over the documentation for route, arp,
> tun/tap, etc., but don't have a deep enough understanding of
> Linux networking to know where to begin.
>
> Thanks,
> Amanda
>
> I guess you only have to put a line in /etc/hosts like: 192.168.56.101
> localhost
>
> --
> Ori Idan
>
>
>
Actually this will not work. It will tell your computer that the IP of
localhost is 192.168.56.101. Your computer will query the network,
(probably via the default gateway) to look for the computer with this
IP. It will not in any way associate this IP with itself.
Aliasing as mentioned in other replies is the correct answer.
cheers,
darryl
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list