Setting up FreeBSD 10.3 Jails
Just some rough working notes on setting up FreeBSD 10.3 jails in 2016. I've done this from a fresh install from a virtual image on the FreeBSD downloads page- so literally from an empty, bare minimum base image.
I noted that older documentation seems to leave out key details, is incompatible with current builds, etc. Thought it would be worth documenting what I did in order to get jails working nicely, in case someone else finds it of use.
Get the base of ezJail set up, as advised by the FreeBSD documentation:
I noted that older documentation seems to leave out key details, is incompatible with current builds, etc. Thought it would be worth documenting what I did in order to get jails working nicely, in case someone else finds it of use.
Get the base of ezJail set up, as advised by the FreeBSD documentation:
echo 'cloned_interfaces="lo1"' >> /etc/rc.conf
echo 'ezjail_enable="YES"' >> /etc/rc.conf
pkg boostrap
pkg install ezjailSet up /usr/ports so we have something to base our jails off, and then create the base jail (this will implicitly do a make installworld). This will take fucking ages. Maybe chain the commands together (using ';') and grab a coffee or 7.
svn checkout https://svn.FreeBSD.org/base/stable/10 /usr/src
cd /usr/src
make buildworld
ezjail-admin update -i -pNow we can restart the box, have ezjail start up for us & be ready to use:
ezjail-admin create dnsjail 'lo1|127.0.1.1'
ezjail-admin start dnsjail
ezjail-admin console dnsjailAnd there's your jail :)
Comments
Post a Comment