Home arrow Latest Tutorials arrow Creating a FreeBSD Jail
Creating a FreeBSD Jail PDF  
Digg Reddit Ma.gnolia Stumble Upon Facebook Twitter Google Yahoo! MyWeb Furl" BlinkList Technorati Mixx Bookmark

FreeBSD have a neat and very useful feature of separating different 'virtual-like' machines with Jail. In fact those machines are not emulated in any virtualized solution, but are FreeBSD files and directories organized separately like different machines, on the same machine, sharing the same CPU and memory.

This tutorial is work in progress...

     D=/here/is/the/jail
     cd /usr/src
     mkdir -p $D
     make world DESTDIR=$D
     make distribution DESTDIR=$D
     mount -t devfs devfs $D/dev


Add in rc.conf the following lines:

jail_enable="YES"
jail_list="machine1"             #list of machines separated by space

jail_machine1_rootdir="/usr/home/virtual/machine1"
jail_machine1_hostname="machine.example.com"
jail_machine1_ip="10.0.0.10"
jail_machine1_devfs_enable="YES"
jail_machine1_devfs_ruleset="machine1_ruleset"



Tips
-------

To list jails use:   jls
To connect to a jail:   jexec 2 /bin/csh      # (where 2 is second jail. Use jls to list jails and found jail ID):
Start a jail: /etc/rc.d/jail start machine1       # (machine1 is configured in rc.conf)

 
< Prev   Next >

Other BSD Systems

OpenBSD

Polls

Best BSD firewall?