Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Mar 2009 13:21:41 -0600
From:      Tim Judd <tajudd@gmail.com>
To:        Dave <sed.entary333@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Bind to Localhost from Jail
Message-ID:  <ade45ae90903131221p62191a1w73e08ec4190b7498@mail.gmail.com>
In-Reply-To: <c6d26deb0903131159hff89b49p4943430d691719a8@mail.gmail.com>
References:  <c6d26deb0903131159hff89b49p4943430d691719a8@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Mar 13, 2009 at 12:59 PM, Dave <sed.entary333@gmail.com> wrote:

> Hi all,
>
> I'm trying to get cPanel installed on my host, and to run it from jail.
>  The
> installer script that cPanel provides, however, seems to be confused by the
> fact that it cannot test the daemons it has installed by checking if they
> are listening on localhost.  Is there any way to allow services running in
> jail to bind on localhost?
>
> I noticed that there was a patch committed to the stable branch that
> allowed
> for jails to have multiple or no ip addresses.  Is this perhaps a solution
> to the problem I've outlined above?
>
> If anyone can provide any insight it would be much appreciated!
>
> Thanks,
> Dave
>

How does any system to know if you're talking to the host localhost, or the
jail's localhost?  I see a logical flaw that would make that somewhat
difficult.  Since the point of IP addresses are supposed to be unique (let's
not get into rfc1918 addresses, or my localhost has your localhost IP), how
can that be safely determined?

Now, if it was 127.0.0.10 on the host, and 127.0.0.1 on the jail, and
127.0.0.2 on a 2nd jail, etc -- that could work.

can you trick cPanel by using /etc/hosts to say localhost (name of a
machine) maps to your jail's IP?  Can you provide any other workaround that
will allow such scripts to dynamically and correctly find the information
they're looking for?


Couple ideas, HTH

--Tim



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ade45ae90903131221p62191a1w73e08ec4190b7498>