Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jan 2009 12:39:06 +0300 (MSK)
From:      Dmitry Morozovsky <marck@rinet.ru>
To:        Robert Watson <rwatson@freebsd.org>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: jail: external and localhost distinction
Message-ID:  <alpine.BSF.2.00.0901291237020.91263@woozle.rinet.ru>
In-Reply-To: <alpine.BSF.2.00.0901290855010.70708@fledge.watson.org>
References:  <alpine.BSF.2.00.0901290021000.91263@woozle.rinet.ru> <alpine.BSF.2.00.0901290855010.70708@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 29 Jan 2009, Robert Watson wrote:

RW> > am I right concluding that under FreeBSD jail there is no way to attach
RW> > two processes to the same port of external interface address and
RW> > localhost?
RW> > 
RW> > I tried to move rather standard two-tier nginx(ip:80)+apache(127.1:80)
RW> > scheme into a jail and on apache start got
RW> > 
RW> > [Thu Jan 29 00:09:32 2009] [crit] (48)Address already in use: make_sock:
RW> > could not bind to address 127.0.0.1 port 80
RW> > 
RW> > (this is under RELENG_7 if it's relevant)
RW> > 
RW> > Any thoughts? Thanks in advance.
RW> 
RW> The way Jail is implemented is that the jail IP is silently substituted for
RW> the loopback IP is used.  This has some downsides, and this is one of them.
RW> The virtual network stack (VIMAGE) project for FreeBSD 8.0 is intended to
RW> address this, among many other things, by providing full virtualization of
RW> all network stack data structures for jails.

Thank you for clarification, now I see this is actually expected behaviour :)

Would then starting second jail with the same root and, say, 127.10.0.1 as an 
address be a workaround?


-- 
Sincerely,
D.Marck                                     [DM5020, MCK-RIPE, DM3-RIPN]
[ FreeBSD committer:                                 marck@FreeBSD.org ]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru ***
------------------------------------------------------------------------



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