Map non-127.x.x.x address back to own machine?

Colin McGregor colin.mc151-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Wed Sep 14 07:12:38 UTC 2011


On Wed, Sep 14, 2011 at 1:15 AM, Ori Idan <ori-RdxWQVHs3mjDN57Tih+YPw at public.gmane.org> wrote:
>
>
> On Wed, Sep 14, 2011 at 8:12 AM, Scott Sullivan <scott-lxSQFCZeNF4 at public.gmane.org> wrote:
>>
>> On 09/14/2011 01:07 AM, Scott Sullivan wrote:
>>>
>>> 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.
>>>
>>
>>
>> Okay, no more answer questions when it's time to sleep. s/could/could not/
>>
>> Anyways, the correct term seems to be Aliasing.
>> http://www.g-loaded.eu/2005/11/05/assign-virtual-ips-to-your-nic/
>>
>> I wanted to say vlan, but that's the eth0.1 (dot) notation.
>>
>> All the above does is create and alias on the loopback network device
>> instead of on say eth0 as would more likely happen.
>
> I thought it was strange to see someone from Canada answering at such an
> hour...
> I am now in Israel and for me it is 8:00 am :-)
>
> --
> Ori Idan

Some of us have insomnia from time to time :-) .

Colin McGregor
--
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