FreeBSD jails: networking: iface aliases rc.conf

From wikinotes

This is the old method of setting up jails with networking.
It is much simpler to do this as of FreeBSD-11 using jail.conf

# /etc/rc.conf

# In Jail config in rc.conf, you can share a network interface
# with another IP. However, BOTH IPs MUST BE IN THE SAME SUBNET
# if they are using the same Network Interface.
default_router="192.168.1.1"
jail_gitbox_ip="192.168.1.201"
ifconfig_rl0_alias0="inet 192.168.1.201/24"
# Default Route
# Since the ip being assigned to the jail is a static IP, we
# need to make sure that the default routing gateway points to
# the router. Check the default routing gateway with:

netstat -rn

# If incorrect, or not present, set the address
# (this is loaded from /etc/resolv.conf)
sudo route add default 192.168.1.1
# /home/j/gitbox/etc/resolv.conf
nameserver 192.168.1.1             #or your router's address
# fix Alias0 missing map file error
make -C /etc/mail aliases