I'm attempting to launch a jail in a jail on FreeBSD 13.2-p1. In principle, such a hierarchical jail should be working - as far as I understand, poudriere is making use of that. So I suppose I must have f*ed up my config somehow, but I can't seem to find the issue after poking at it for several hours.
Here's the jail.conf for the "parent" host:
The fstab file consists of multiple nullfs mounts that pull everything together. The child jail is also mounted directly into the jails filesystem space.
I noticed, that the sysctls for children.max are zero within the jail - not sure whether that is indicate of anything:
Finally, trying to start a sub jail "dns" (configured in main jail's /etc/jail.conf) within that firewall jail gives:
Feels like the
Thanks.
Here's the jail.conf for the "parent" host:
Code:
firewall {
vnet;
vnet.interface = "epair0b";
children.max = 20;
allow.mount;
allow.mount.devfs;
allow.mount.procfs;
allow.mount.linprocfs;
allow.mount.zfs;
allow.mount.nullfs;
allow.mount.tmpfs;
allow.raw_sockets;
allow.socket_af;
allow.sysvipc;
allow.chflags;
enforce_statfs=1;
allow.socket_af;
allow.sysvipc;
children.max = 32;
enforce_statfs = 1;
path = "/lab/runtime/firewall";
host.hostname = "firewall";
mount.devfs;
mount.fstab "/lab/runtime/firewall.fstab";
exec.prestart = "/sbin/ifconfig epair0 create up";
exec.prestart += "/sbin/ifconfig epair0a name firewall0 up";
exec.prestart += "/sbin/ifconfig switch0 addm firewall0 up";
# Commands to run in jail after it is created
exec.start = "/sbin/ifconfig lo0 127.0.0.1 up";
exec.start += "/sbin/ifconfig epair0b 192.168.11.135 netmask 255.255.255.224 up";
exec.start += "/sbin/route add default 192.168.11.158";
exec.start += "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
exec.poststop = "ifconfig switch0 deletem firewall0";
exec.poststop += "ifconfig firewall0 destroy";
#securelevel=1;
persist;
}
The fstab file consists of multiple nullfs mounts that pull everything together. The child jail is also mounted directly into the jails filesystem space.
I noticed, that the sysctls for children.max are zero within the jail - not sure whether that is indicate of anything:
Code:
root@firewall:/ # sysctl -a |grep children
security.jail.param.children.max: 0
security.jail.param.children.cur: 0
Finally, trying to start a sub jail "dns" (configured in main jail's /etc/jail.conf) within that firewall jail gives:
Code:
root@firewall:/ # service jail start dns
Starting jails: cannot start jail "dns":
Feels like the
children.max
parameter in the main jail is ignored, but for the life of me, I can't figure out why. If anyone has any troubleshooting suggestions, I'd very much appreciate any inputs.Thanks.