nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

FreeBSD BIND9 Chroot Setup

This is a discussion on FreeBSD BIND9 Chroot Setup within the All about FreeBSD/OpenBSD/NetBSD forums, part of the *BSD Operating systems category; hi!! anyone can point to commands or good document on net ? I would like to setup freebsd bind9 based ...


Go Back   nixCraft Linux Forum > *BSD Operating systems > All about FreeBSD/OpenBSD/NetBSD

Linux answers from nixCraft.


All about FreeBSD/OpenBSD/NetBSD Discuss all about the Rock solid FreeBSD/OpenBSD/NetBSD. You are free to talk about any issues related to BSD administration, networking, services and other stuff, share information or ask doubts.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-04-2009, 02:04 PM
Junior Member
User
 
Join Date: Apr 2009
OS: freeBSD7.0
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
yuki_10 is on a distinguished road
Default FreeBSD BIND9 Chroot Setup

hi!!

anyone can point to commands or good document on net ? I would like to setup freebsd bind9 based on chroot?
thanks in advance
Reply With Quote
  #2 (permalink)  
Old 03-04-2009, 04:35 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 244 Times in 183 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Hi,

FreeBSD 7 and BIND9 has in built support for chroot. All, you have to do is add the following to /etc/rc.conf:
Code:
named_enable="YES"
named_chrootdir="/var/named"
Once done you need to start named:
Code:
/etc/rc.d/named start
And it will create directory structure inside /var/named/ as follows:
Code:
dr-xr-xr-x  4 root  wheel  512 Mar 30 11:17 dev
drwxr-xr-x  3 root  wheel  512 Jul  6  2008 etc
drwxr-xr-x  6 root  wheel  512 Jan 16 13:06 var
Now, you need to add change directory to etc/namedb and update named.conf as per your needs.
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help

Last edited by nixcraft; 03-04-2009 at 08:04 PM.
Reply With Quote
  #3 (permalink)  
Old 03-04-2009, 05:25 PM
Junior Member
User
 
Join Date: Apr 2009
OS: freeBSD7.0
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
yuki_10 is on a distinguished road
Default

thanks i' ll try it
Reply With Quote
  #4 (permalink)  
Old 03-04-2009, 05:34 PM
Junior Member
User
 
Join Date: Apr 2009
OS: freeBSD7.0
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
yuki_10 is on a distinguished road
Default

hi!!
it's me again. When you say "update named.conf" what do you mean?
Caus my bind is already configure
Reply With Quote
  #5 (permalink)  
Old 03-04-2009, 08:03 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 244 Times in 183 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

You need to configure a few things as per your setup, such as:
  1. Security
  2. Logging
  3. Zone directory and so on..
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #6 (permalink)  
Old 06-04-2009, 08:21 PM
Junior Member
User
 
Join Date: Apr 2009
OS: freeBSD7.0
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
yuki_10 is on a distinguished road
Default

hi!!
how can i known that my bind is running on chroot?
Reply With Quote
  #7 (permalink)  
Old 06-04-2009, 08:26 PM
Junior Member
User
 
Join Date: Apr 2009
OS: freeBSD7.0
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
yuki_10 is on a distinguished road
Default

when i finish with all configuration
thanks for your help
Reply With Quote
  #8 (permalink)  
Old 06-04-2009, 08:51 PM
Junior Member
User
 
Join Date: Apr 2009
OS: freeBSD7.0
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
yuki_10 is on a distinguished road
Default

when i restart my bind, i got this message:
name[1281]: loading configuration:file notfound
name[1281]: exiting (due to fatal error)
Reply With Quote
Reply

Tags
/etc/rc.conf , bind , bind chroot , freebsd , freebsd bind chroot , named chroot


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Linux Questions About BoF and Chroot shanthiavari Linux software 1 14-06-2008 11:52 AM
Minisendmail chroot get.the.MaX Web servers 2 17-01-2008 11:58 PM
lighty: mysql issue when chroot enabled TECK Web servers 11 24-11-2007 11:06 AM
FreeBSD setup ACL or Access control list tutorial part # 1 nixcraft Getting started tutorials 2 20-12-2006 01:55 AM
how to setup ssh on firewall freebsd raj1 All about FreeBSD/OpenBSD/NetBSD 1 23-02-2006 04:23 PM


All times are GMT +5.5. The time now is 02:59 PM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38