#!/usr/local/bin/bash # # bootjail script # # Zoidial, Inc. # Eric Thern eric@zoidial.com # June, 2001 # updated March 2002 # # # set this to the name of your network interface # NET_DEVICE=fxp0 # # path to the directory that has your IP address jailed directories # exclude trailing slash # PATH=/jail # $1 = IP addy # $2 = path # $3 = hostname /sbin/ifconfig $NET_DEVICE alias $1 netmask 255.255.255.255 # /sbin/mount -t procfs proc $2/proc /usr/sbin/jail $2 $3 $1 /bin/sh /etc/rc echo "Jail $3 started in directory $2"