Network annoyances in iocage

With the release of FreeNas 11.2 Iocage can now be managed by GUI. However, if you are still using version 11.1 U4 then this post will still apply as you will still have to rely on the root CLI to setup your jails

On addition to that when you setup an iocage jail the network configuration gets all screwed up. To fix this issue you will have to update iocage from the CLI before you even think about setting up the jail.

To do this open up the FreeNAS CLI and enter the following.

cd /tmp git
clone --recursive https://github.com/iocage/iocage
cp -R iocage/iocage/lib/ /usr/local/lib/python3.6/site-packages/iocage/lib

Once this is done you can setup the iocage jail in the usual manner.

After a reboot the jail isn’t working anymore.

Yet another frustration with a relatively simple solution. However it is important that you use the FreeNAS CLI (ifconfig from shell and the first interface connected to your home network)

What you need to do here is create two tunables in the rc.conf

Log into FreeNAS then click on.

Click on Add Tunable and you will then see the following screen.

The first tunable should be configured as follows.

  • Variable: cloned_interfaces
  • Value: bridge0
  • Type: rc.conf
  • Enabled: tick

Click okay to save the first tunable. Next click add tunable again again and enter the following.

  • Variable: ifconfig_bridge
  • Value: addm igb0 up
  • Type: rc.conf
  • Enabled: tick

Click okay to save the second tunable and then restart the server. You should now have restored network connectivity to the jails.