Re: [vserver] assigning the hidden 127.0.0.1 loopback-address

From: Daniel Hokka Zakrisson <daniel_at_hozac.com>
Date: Wed 21 Nov 2007 - 22:25:54 GMT
Message-ID: <35376.192.168.102.6.1195683954.squirrel@intranet>

Ryan Agler wrote:
> I am using the 2.3 version, which it nice in that it lets applications
> that
> expect 127.0.0.1 to function. My understanding is that vserver is coming
> up
> with an arbitrary separate 127.x.x.x address and making it look like
> 127.0.0.1 for each guest.

It's not arbitrary. It's 127.<high 8 bits of nid>.<low 8 bits of nid>.1,
and you can see what is currently assigned to a context by looking at
/proc/virtnet/<nid>/info (the lback address).

> When turning on iptables logging, it can be seen what the "real" 127.x.x.x
> address vserver has associated with 127.0.0.1 in a particular guest.
>
> For purposes of establishing firewalling rules between guests, I am
> wondering if it is possible to assign beforehand the specific 127.x.x.x
> address that vserver will mask as 127.0.0.1 in a particular guest, and how
> to go about that?

Well, as I said above, you can easily calculate that. If you want to
assign a specific address, you can put it in
/etc/vservers/<guest>/interfaces/lback (assuming 0.30.214+ utils).

-- 
Daniel Hokka Zakrisson
Received on Wed Nov 21 22:26:05 2007
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 21 Nov 2007 - 22:26:10 GMT by hypermail 2.1.8