Monday, October 22, 2012

FreeBSD: How to Jails on FreeBsd(Filter access)

Thanks Kokteels, the guide refered from you:
http://shab4b.blogspot.com/2012/03/how-to-jails-on-freebsd-82.html

1. Need to csup for port & stable supfile. Skip this step if you already compile before. 

2. Next step 

# setenv D /jail/www
# mkdir -p $D 
# cd /usr/src
# make buildworld
# make installworld DESTDIR=$D
# cd etc/
# make distribution DESTDIR=$D 
# mount -t devfs devfs $D/dev 

3. Edit following patch  #ee /etc/rc.conf
sshd_enable="YES"
ifconfig_em0="DHCP"
ifconfig_bge0_alias1="inet 10.0.0.100 netmask 255.255.255.0"
jail_set_hostname_allow="NO"
jail_enable="YES"
jail_list="www"
jail_interface="bge0"
jail_devfs_enable="YES"
jail_procfs_enable="YES"
jail_mount_enable="NO"
jail_www_rootdir="/jail/www"
jail_www_hostname="www.ozel.net"
jail_www_ip="10.0.0.100"
jail_www_devfs_ruleset="devfsrules_jail"
*can be any available IP at you LAN.

4. Start Jail
#/etc/rc.d/jail start

5. Testing Jail.
#jls -v
# jls


***Minimum 6Gb need to deploy jails. Csup will take lot of file.

0 comments:

Post a Comment