Bind to Localhost from Jail

Tim Judd tajudd at
Fri Mar 13 12:21:43 PDT 2009

On Fri, Mar 13, 2009 at 12:59 PM, Dave <sed.entary333 at> 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 on the host, and on the jail, and 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


More information about the freebsd-questions mailing list