We have had Jails on FreeBSD since 4.0 came out 19 years ago in March 2000. This describes how to setup jails on FreeBSD 12 without any helpers.
# bsdinstall jail /var/jail/mysqlDeselect all optional system components during the installation as well as any services.
exec.start = "/bin/sh /etc/rc"; exec.stop = "/bin/sh /etc/rc.shutdown"; exec.clean; mount.devfs; path = "/var/jail/mysql"; mysql { host.hostname = "mysql.intra.ogris.net"; ip4.addr = "lo1|10.0.0.2"; }
jail_enable="YES" jail_list="mysql"
cloned_interfaces="lo1" ifconfig_lo1="inet 10.0.0.1 netmask 255.255.255.0"
nat 1 config if vtnet0 same_ports add nat 1 ip from any to any via vtnet0 add allow ip from any to anyReplace vtnet0 by your actual network interface.
kld_list="ipfw_nat" gateway_enable="YES" firewall_enable="YES" firewall_type="/etc/ipfw.rules"
# jexec mysql /bin/csh
# cat >/etc/unbound/conf.d/local.conf <<EOF server: interface: 0.0.0.0 access-control: 127.0.0.0/8 allow access-control: 10.0.0.0/24 allow EOF # service local_unbound enable # service local_unbound start
# portsnap fetch extract
SENDMAIL_MC=/etc/mail/freebsd.mc SENDMAIL_SUBMIT_MC=/etc/mail/freebsd.submit.mc
sendmail_enable="YES" sendmail_rebuild_aliases="YES"
FEATURE(`accept_unresolvable_domains')dnl FEATURE(`accept_unqualified_senders')dnl DAEMON_OPTIONS(`Name=IPv4, Family=inet, Addr=10.0.0.1')dnl
define(`SMART_HOST', `[192.168.23.42]')dnl
# make -C /etc/mail clean all install # service sendmail restart
sendmail_rebuild_aliases="YES"
define(`SMART_HOST', `[10.0.0.1]')dnl FEATURE(nocanonify)dnl
# make -C /etc/mail clean all install # service sendmail restart
I wrote and have used jupdate.sh to run freebsd-update, portsnap, and portmaster on the host system and inside each running jail.