1fa212bfbSJulian Elischer# $FreeBSD$ 2fa212bfbSJulian Elischer 3*abd0b262SDevin TeskeSample 1: jail.conf(5) 4*abd0b262SDevin Teske 5*abd0b262SDevin Teske $ cp jib jng /usr/sbin/ 6*abd0b262SDevin Teske $ cat jail.xxx.conf >> /etc/jail.conf 7*abd0b262SDevin Teske $ vi /etc/jail.conf 8*abd0b262SDevin Teske # NB: Customize root directory and bridge interface 9*abd0b262SDevin Teske $ sysrc jail_enable=YES 10*abd0b262SDevin Teske # NB: Assumes jail_list="" (meaning ``all jails in jail.conf'') 11*abd0b262SDevin Teske # NB: Assumes rc_conf_files="" (``below rc.conf(5) samples not used'') 12*abd0b262SDevin Teske $ service jail start 13*abd0b262SDevin Teske 14*abd0b262SDevin TeskeSample 2: rc.conf(5) 15*abd0b262SDevin Teske 16*abd0b262SDevin Teske $ cp jib jng /usr/sbin/ 17*abd0b262SDevin Teske $ cp rc.conf.jails /etc/ 18*abd0b262SDevin Teske $ vi /etc/rc.conf.jails 19*abd0b262SDevin Teske # NB: Customize root directory and bridge interface 20*abd0b262SDevin Teske $ sysrc rc_conf_files+=/etc/rc.conf.jails 21*abd0b262SDevin Teske # NB: Assumes /etc/jail.conf does not exist and jail_list="" 22*abd0b262SDevin Teske $ service jail start 23*abd0b262SDevin Teske 24*abd0b262SDevin TeskeSample 3: Per-jail jail.conf(5) 25*abd0b262SDevin Teske 26*abd0b262SDevin Teske $ cp jib jng /usr/sbin/ 27*abd0b262SDevin Teske $ cp jail.xxx.conf /etc/ 28*abd0b262SDevin Teske $ vi /etc/jail.xxx.conf 29*abd0b262SDevin Teske # NB: Customize root directory and bridge interface 30*abd0b262SDevin Teske $ sysrc jail_enable=YES 31*abd0b262SDevin Teske $ sysrc jail_list+=xxx 32*abd0b262SDevin Teske # NB: Assumes rc_conf_files="" 33*abd0b262SDevin Teske $ service jail start 34*abd0b262SDevin Teske 35*abd0b262SDevin TeskeSample 4: Per-jail rc.conf(5) 36*abd0b262SDevin Teske 37*abd0b262SDevin Teske $ cp jib jng /usr/sbin/ 38*abd0b262SDevin Teske $ cp rcjail.xxx.conf /etc/ 39*abd0b262SDevin Teske $ vi /etc/rcjail.xxx.conf 40*abd0b262SDevin Teske # NB: Customize root directory and bridge interface 41*abd0b262SDevin Teske $ sysrc jail_enable=YES 42*abd0b262SDevin Teske $ sysrc jail_list+=xxx 43*abd0b262SDevin Teske $ sysrc rc_conf_files+=/etc/rcjail.xxx.conf 44*abd0b262SDevin Teske # NB: Assumes neither /etc/jail.conf nor /etc/jail.xxx.conf exist 45*abd0b262SDevin Teske $ service jail start 46*abd0b262SDevin Teske 47*abd0b262SDevin TeskeFor additional recipes, see share/examples/netgraph for 48fa212bfbSJulian Elischermaking and hooking together jails using netgraph as the 49fa212bfbSJulian Elischervirtual networking fabric. 50