FreeBSDJail |
/etc/rc.d/jail start /etc/rc.d/jail stop /etc/rc.d/jail start myjail /etc/rc.d/jail stop myjail ifconfig dc0 inet alias 192.168.1.99/32 mount -t procfs proc /export/mirror01/cluster/jail/proc mount -t devfs dev /export/mirror01/cluster/jail/dev jail /export/mirror01/cluster/jail geektank 192.168.1.99 /bin/sh /etc/rc ifconfig dc0 inet delete 192.168.1.99
mkdir /usr/jail/new cd /usr/jail/old tar -cpf - . | tar -C /usr/jail/new -xpf -
# cpdup /jail/directory /newjail/directory # jail /newjail/directory newjail.hostname newjailip /bin/sh /etc/rc
cd /usr/src mkdir -p /export/mirror01/cluster/jail make -j4 world DESTDIR=/export/mirror01/cluster/jail make -j4 distribution DESTDIR=/export/mirror01/cluster/jail mount_devfs devfs /export/mirror01/cluster/jail/dev
ifconfig_dc0_alias0="inet 192.168.1.y netmask 0xffffffff" ifconfig_dc0_alias1="inet 192.168.1.z netmask 0xffffffff"
Configure all services on the host and jails to the proper interface.
ListenAddress 192.168.1.x
Listen 192.168.1.x:80
listen-on { 192.168.1.x; };
jail /path/to/jail testhostname 192.168.11.100 /bin/sh # example: jail /export/mirror01/cluster/jail geektank.subaudi.net 192.168.1.99 /bin/sh
# build on the main system: $ cd /var/db/pkg/fontconfig-2.2.0/ $ pkg_create -v -c +COMMENT -d +DESC -f +CONTENTS -m +MTREE_DIRS ~/fontconfig-2.2.0.tgz
If you run NagioS inside a FreeBSDJail, the default check_ping won't work since, at this time, it isn't a good idea to enable ping in a jail. I used some code I found on the web to create this tcp ping replacement for check_ping.
Note that some servers or other devices may not respond to a tcp ping.