I'm looking for working examples of jail.conf for a parent jail where I can run 'service jail start' inside the parent jail to launch the child jail.
Creating a jail works but creating a parent jail where the child jail also works has been a challenge.
The host's /etc/jail.conf describing the parent jail:
The parent's /etc/jail.conf describing the child jail:
At the moment, the error I see when running 'service jail start' inside the parent jail is this:
Creating a jail works but creating a parent jail where the child jail also works has been a challenge.
The host's /etc/jail.conf describing the parent jail:
Code:
parent {
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
exec.consolelog = "/var/log/jail_console_${name}.log";
allow.mount;
allow.mount.devfs;
allow.mount.procfs;
allow.mlock;
allow.raw_sockets;
allow.mount.nullfs;
enforce_statfs=1;
exec.clean;
mount.devfs;
devfs_ruleset=11;
host.hostname="${name}";
path="/usr/local/jails/containers/${name}";
ip4.addr=lo0|127.0.0.2/8;
children.max=10;
}
The parent's /etc/jail.conf describing the child jail:
Code:
child {
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
exec.consolelog = "/var/log/jail_console_${name}.log";
allow.raw_sockets;
exec.clean;
devfs_ruleset=0;
mount.devfs;
host.hostname="${name}";
path="/usr/local/jails/containers/${name}";
ip4.addr=lo0|127.0.0.3/8;
children.max=0;
}
At the moment, the error I see when running 'service jail start' inside the parent jail is this:
Code:
Starting jails:ifconfig: ioctl (SIOCAIFADDR): Operation not permitted
jail: child: /sbin/ifconfig lo0 inet 127.0.0.3/8 alias: failed