Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Aug 2010 13:32:15 +0200
From:      Julien Cigar <jcigar@ulb.ac.be>
To:        freebsd-questions@freebsd.org
Subject:   Re: How to connect a jail to the web ?
Message-ID:  <4C6138BF.7080609@ulb.ac.be>
In-Reply-To: <268321.67123.qm@web24608.mail.ird.yahoo.com>
References:  <268321.67123.qm@web24608.mail.ird.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------040808030307040609030801
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 08/10/2010 13:01, Brice ERRANDONEA wrote:
> Hello,
>
> I've just created my first FreeBSD jail in order to install a web server inside.
> But I don't know how to connect it to the web. When I try pinging a http
> website, it doesn't work. Of course, it works when I do it from outside the
> jail.
>
> Another problem, probably linked to the first one, I can't run rc within the
> jail, even as the jail's root. It says : permission denied.
>
> Here's how I built and started my jail. I had already run make buildworld when
> upgrading to 8.1 release :
>
> # mkdir /usr/prison
> # cd /usr/src
> # make installworld DESTDIR=/usr/prison
> # make distribution DESTDIR=/usr/prison
> # mount -t devfs devfs /usr/prison/dev
> # jail -c path=/usr/prison host.hostname=ServeurWeb ip4.addr=192.1.1.1 persist
> # jail /usr/prison ServeurWeb 192.1.1.1 csh
>
> I guess this must be a very basic question but please help me.
>

make sure NAT is enabled on the host..
I use PF for that with something like (/etc/pf.conf):

ext_if="bce0"
int_if="bce1"
internal_net="192.168.0.0/24"
nat on $ext_if from $internal_net to any -> ($ext_if)

>
>
>
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


-- 
No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced.

--------------040808030307040609030801--



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