Using jails on FreeBSD ====================== Author: Momchil Ivanov Date : 2019.02.24 Introduction ------------ This article describes how to use jails on FreeBSD. Setup network interfaces. Method 1 ---------------------------------- Create virtual interface for the jail network. The simplest way is to use one interface for all jails. Add to /etc/rc.conf: cloned_interfaces="lo1" ipv4_addrs_lo1="127.0.1.1-9/24" Setup network interfaces. Method 2 ---------------------------------- One can also use multiple network interfaces, one for each jail. The configuration in /etc/rc.conf might look like this: cloned_interfaces="lo1 lo2 lo3 lo4" ifconfig_lo1="inet 127.0.10.1 netmask 255.255.255.0" ifconfig_lo1_alias0="inet 127.0.10.2 netmask 255.255.255.0" ifconfig_lo1_alias1="inet 127.0.10.3 netmask 255.255.255.0" ifconfig_lo1_alias2="inet 127.0.10.4 netmask 255.255.255.0" ifconfig_lo2="inet 127.0.20.1 netmask 255.255.255.0" ifconfig_lo3="inet 127.0.30.1 netmask 255.255.255.0" ifconfig_lo4="inet 127.0.30.1 netmask 255.255.255.0"