/etc/jail.conf documentation?

Mark Felder feld at FreeBSD.org
Wed Oct 28 20:28:12 UTC 2015

On Wed, Oct 28, 2015, at 10:59, Valeri Galtsev wrote:
> Dear All,
> Can someone recommend something similar to FreeBSD handbook that
> describes
> building jails for newer systems meaning /etc/jail.conf as opposed to
> /etc/rc.conf which handbook currently has in its jails chapter. I still
> have all jail configurations on 9.3 boxes in /etc/rc.conf, but it is time
> to build 10.x production boxes, and do things modern way (implying
> /etc/jail.conf). I still intend to keep building jails "old fashion way"
> as described in handbook, as opposed to using tools "ezjail" or similar.
> Thanks for all your advises!
> Valeri
> PS I know I can always use UNIX way of getting information, like
> man jail.conf
> , still...

Hi Valeri,

It's simpler than you think. Your /etc/jail.conf can be as simple as:

exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";

path = /zroot/jails/$name;

    host.hostname = "myjail.local";
    ip4.addr =;

You can add more options to the jail as required. Look at jail(8) man
page instead of jail.conf(5) which lists the format, but not the
options. I think this is kind of backwards myself, but I wasn't involved
in these docs.

Now you can do "service jail start myjail" it will just work. :-)

  Mark Felder
  ports-secteam member
  feld at FreeBSD.org

More information about the freebsd-questions mailing list