system:
HOST:
CHILD (rc.conf):
CHILD (jail.conf):
when i run from host
with some investignation i found that
it appears that some services depends on
any ideas? what am i doing wrong?
FreeBSD 13.0-RELEASE
HOST:
Code:
cat /etc/jail.conf
# jail.conf
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
exec.clean;
allow.noset_hostname;
allow.raw_sockets;
allow.sysvipc;
allow.dying;
path = "/vol/jls/${name}";
host.hostname = "${name}.bsd";
parent_jail {
jid = 50;
mount.devfs;
devfs_ruleset=5;
vnet;
vnet.interface="v${jid}";
exec.consolelog = "/var/log/jail_${name}.log";
exec.prestart += "ifconfig epair0 create up";
exec.prestart += "ifconfig epair0a inet 10.20.20.254 netmask 0xffffff00";
exec.prestart += "ifconfig epair0a name j${jid}";
exec.created = "ifconfig epair0b name v${jid}";
exec.poststop += "sleep 4";
exec.poststop += "ifconfig v${jid} -vnet $name";
exec.poststop += "ifconfig j${jid} destroy";
allow.mount;
allow.mount.nullfs;
allow.mount.devfs;
allow.mount.tmpfs;
enforce_statfs=1;
allow.dying;
allow.chflags;
allow.socket_af;
children.max=20;
}
CHILD (rc.conf):
Code:
ifconfig_v50="inet 10.20.20.1 netmask 0xffffff00"
defaultrouter="10.20.20.254"
dumpdev="NO"
clear_tmp_enable="YES"
update_motd="no"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
sendmail_enable="NONE"
jail_enable="YES"
cron_enable="NO"
named_enable="NO"
CHILD (jail.conf):
Code:
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
exec.clean;
allow.noset_hostname;
allow.raw_sockets;
allow.sysvipc;
allow.dying;
path = "/vol/jls/${name}";
host.hostname = "v50-${name}.bsd";
nested_jail {
jid = 51;
interface = v50;
ip4.addr = "v50|10.20.20.10/24";
mount.devfs;
devfs_ruleset=5;
exec.consolelog = "/var/log/jail_${name}.log";
}
when i run from host
service jail start parent_jail
parent_jail starts but no nested_jail, when i log into parent_jail ( jexec 50 login -f root
) and do service jail start
nestad_jail is createdwith some investignation i found that
service -e
doesn't show "jail":
Code:
# service -e
/etc/rc.d/cleanvar
/etc/rc.d/ip6addrctl
/etc/rc.d/netif
/etc/rc.d/virecover
/etc/rc.d/newsyslog
/etc/rc.d/os-release
/etc/rc.d/syslogd
it appears that some services depends on
security.jail.jailed
wchich in jailed enviroment is equal to 1any ideas? what am i doing wrong?