3 The below 4 samples require a VIMAGE enabled kernel:
6 $ cp VIMAGE /usr/src/sys/amd64/conf/
8 $ make KERNCONF=VIMAGE kernel
11 FreeBSD 12 has VIMAGE enabled in GENERIC on amd64.
12 In that case, for jng simply load the ng_ether module first
13 (ng_bridge and ng_eiface will load on demand):
16 # Load the ng_ether module at boot:
17 $ sysrc kld_list+=ng_ether
18 # Load ng_ether at once without rebooting:
21 Sample 1: jail.conf(5)
23 $ cp jib jng /usr/sbin/
24 $ cat jail.xxx.conf >> /etc/jail.conf
26 # NB: Customize root directory and bridge interface
27 $ sysrc jail_enable=YES
28 # NB: Assumes jail_list="" (meaning ``all jails in jail.conf'')
29 # NB: Assumes rc_conf_files="" (``below rc.conf(5) samples not used'')
34 $ cp jib jng /usr/sbin/
35 $ cp rc.conf.jails /etc/
36 $ vi /etc/rc.conf.jails
37 # NB: Customize root directory and bridge interface
38 $ sysrc rc_conf_files+=/etc/rc.conf.jails
39 # NB: Assumes /etc/jail.conf does not exist and jail_list=""
42 Sample 3: Per-jail jail.conf(5)
44 $ cp jib jng /usr/sbin/
45 $ cp jail.xxx.conf /etc/
46 $ vi /etc/jail.xxx.conf
47 # NB: Customize root directory and bridge interface
48 $ sysrc jail_enable=YES
49 $ sysrc jail_list+=xxx
50 # NB: Assumes rc_conf_files=""
53 Sample 4: Per-jail rc.conf(5)
55 $ cp jib jng /usr/sbin/
56 $ cp rcjail.xxx.conf /etc/
57 $ vi /etc/rcjail.xxx.conf
58 # NB: Customize root directory and bridge interface
59 $ sysrc jail_enable=YES
60 $ sysrc jail_list+=xxx
61 $ sysrc rc_conf_files+=/etc/rcjail.xxx.conf
62 # NB: Assumes neither /etc/jail.conf nor /etc/jail.xxx.conf exist
65 For additional recipes, see share/examples/netgraph for
66 making and hooking together jails using netgraph as the
67 virtual networking fabric.