FreeBSD Jail Multiple IP
Posted by mafiaid on 14 August 2007
| FreeBSD |
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:
- http://people.freebsd.org/~pjd/patches/jail_2004120901.patch
- http://garage.freebsd.pl/mijail.README
- ftp://ftp.riss-telecom.ru/pub/patches/fbsd53b7-mijail.diff
- http://blog.cg.nu/wp-content/uploads/2006/07/mijail6-tar.gz
- http://blog.cg.nu/?cat=5
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 && make install
Rebuild and install jls:
cd /usr/src/usr.sbin/jls/
make clean && make depend && make && make install
Credit goes to the many people that have worked on this patch and have moved it from version to version.
| FreeBSD |
Niklas CA said
[root@services /usr/src/usr.sbin/jail]# make clean && make depend && make install
rm -f jail jail.o jail.8.gz jail.8.cat.gz
install -s -o root -g wheel -m 555 jail /usr/sbin
install: jail: No such file or directory
*** Error code 71
Stop in /usr/src/usr.sbin/jail.
FreeBSD services.shells.hu 6.3-RELEASE-p2 FreeBSD 6.3-RELEASE-p2 #1: Tue May 6 09:32:18 UTC 2008 root@services.shells.hu:/usr/src/sys/i386/compile/shells i386
I changed the src to 6.3 instead of 6.2, in the patch.
Regards, Niklas CA.
Alexwebmaster said
Hello webmaster
I would like to share with you a link to your site
write me here preonrelt@mail.ru