FreeBSD

www.digitaldaemon.com


FreeBSD www.freebsd.org has a subsystem called jails. Although jails are a subsystem for virtualization there are a couple of things the current jail subsystem does not do or allow. One of these things is multiple IP addresses being assigned to a jail. There are several patches available on the internet:

DragonFlyBSD www.dragonflybsd.org recently seems to have included support for multiple IP addresses per jail.
http://leaf.dragonflybsd.org/mailarchive/users/2006-11/msg00064.html

Since running jais with multiple IP addresses is a very nice feature to have to share hardware but separate netblocks and the patch mentioned as "Multiple Ip’s on FreeBSD 6.1-p3 jail" does not patch without errors on FreeBSD 6.2-STABLE this patch has been taken to create a new patch that should patch against FreeBSD 6.2.

FreeBSD_6.2-STABLE-mijail.patch

To apply the patch:
cd /usr
patch < ~/FreeBSD_6.2-STABLE-mijail.patch

Install patched header files:
cp /usr/src/sys/netinet/in_pcb.h /usr/include/netinet/
cp /usr/src/sys/sys/jail.h /usr/include/sys/


Remake the kernel and reboot.

Rebuild and install jail:
cd /usr/src/usr.sbin/jail/
make clean && make depend && make install

Rebuild and install jls:
cd /usr/src/usr.sbin/jls/
make clean && make depend && make install

Credit goes to the many people that have worked on this patch and have moved it from version to version.

FreeBSD

www.digitaldaemon.com