Map non-127.x.x.x address back to own machine?
Scott Sullivan
scott-lxSQFCZeNF4 at public.gmane.org
Wed Sep 14 05:07:01 UTC 2011
On 09/14/2011 12:57 AM, Ori Idan wrote:
>
>
> On Wed, Sep 14, 2011 at 7:54 AM, Amanda Yilmaz <ayilmaz-e+AXbWqSrlAAvxtiuMwx3w at public.gmane.org
> <mailto: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
>
Alternatively you can actually add mulitple IPs to the loopback interface.
I'm not sure the correct terminology for this is, but sure someone on
list can explain it. (I could find a meaningful answer quickly in the
man page.
ifconfig lo:1 192.168.56.101
I've tested this on my machine and it works.
--
Scott Sullivan
--
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