Date: Tue, 10 Aug 2010 14:42:27 +0300 From: Valentin Bud <valentin.bud@gmail.com> To: Brice ERRANDONEA <berrandonea@yahoo.fr> Cc: freebsd-questions@freebsd.org Subject: Re: How to connect a jail to the web ? Message-ID: <AANLkTikw-6%2BcUuftWurMQwq5M15nTJpqJqnt1qar0Oso@mail.gmail.com> 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
On Tue, Aug 10, 2010 at 2:01 PM, Brice ERRANDONEA <berrandonea@yahoo.fr>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. > Hello, To be able to ping from inside the jail you need raw sockets activated on the host. sysctl security.jail.allow_raw_sockets=1 For ease of configuration you could use ezjail - a jail administration framework written in shell or if you plan to use lots of jails (20+) you could try qjail which is also a jail administration framework. have a great day, v -- network warrior
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikw-6%2BcUuftWurMQwq5M15nTJpqJqnt1qar0Oso>