In previous article I’ve explained how to add IPv6 to your server, now it’s time to show you how to assign IPv6 address to Jail running on your IPv6 host.

I’m using ezjail at this moment to manage my Jails. If you’re like me you can use following command to assign already configured IPv6 address to your Jail at creation time:

ezjail-admin create JAILNAME "em0|IPV4ADDRESS,em0|2a01:4f8:140:54c7::2"

If you already have Jail created and wish to add address to it afterwards you can edit jail configuration file which should be located in /usr/local/etc/ezjail/JAILNAME. Just add IPv6 address to the list of interfaces:

export jail_sites_ip="lo1|127.0.0.1,em0|IPV4ADDRESS,em0|2a01:4f8:140:54c7::2"

Restart Jail afterwards:

ezjail-admin restart JAILNAME