From owner-freebsd-questions@FreeBSD.ORG Tue Aug 10 11:32:16 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2249106564A for ; Tue, 10 Aug 2010 11:32:16 +0000 (UTC) (envelope-from jcigar@ulb.ac.be) Received: from mxin.ulb.ac.be (mxin.ulb.ac.be [164.15.128.112]) by mx1.freebsd.org (Postfix) with ESMTP id 70F1D8FC1E for ; Tue, 10 Aug 2010 11:32:16 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsUBAMzVYEykD30E/2dsb2JhbAAHgw6QTL1kkgOER3MEiFs Received: from bebif01.ulb.ac.be (HELO [10.0.0.194]) ([164.15.125.4]) by smtp.ulb.ac.be with ESMTP; 10 Aug 2010 13:32:15 +0200 Message-ID: <4C6138BF.7080609@ulb.ac.be> Date: Tue, 10 Aug 2010 13:32:15 +0200 From: Julien Cigar Organization: Belgian Biodiversity Platform User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.10) Gecko/20100621 Thunderbird/3.0.5 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <268321.67123.qm@web24608.mail.ird.yahoo.com> In-Reply-To: <268321.67123.qm@web24608.mail.ird.yahoo.com> Content-Type: multipart/mixed; boundary="------------040808030307040609030801" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: How to connect a jail to the web ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Aug 2010 11:32:16 -0000 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--