Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
bind + chroot
#1

This will go over howto setup bind in a chroot enviroment. Newer versions of the bind rpm provide a bind-chroot rpm that sets some of it up for you. So I'm assuming you can install that. So here are the bind rpms I have installed on my system

 



Code:
bind-utils-9.2.5-1
bind-libs-9.2.5-1
bind-9.2.5-1
bind-chroot-9.2.5-1




 

You will want to install those. Now you your first step is to change the homedir of the named user that the bind rpm should have created

 

Here is what mine looks like by default

 



Code:
named:x:25:25:Named:/var/named:/sbin/nologin




 

The bind-chroot rpm installs its dir structure in /var/named/chroot. so we need to change the /var/named section in the /etc/passwd file. You can do that by editing the file or running this command

 



Code:
usermod -d /var/named/chroot named




 

now open up the file /etc/sysconfig/named and if you see the following line.. that file is good to go

 

ROOTDIR=/var/named/chroot

 

If its not there add it.. If its there but a different dir.. you want to change it.

 

then just startup named

 

service named start and you should be set.

 

You should see something like this in your /var/log/messages

 

Apr 14 19:07:16 redhost named[19195]: starting BIND 9.2.5 -u named -t /var/named/chroot

 

make sure -t is pointed to your chroot dir. Remember when it says reading from /etc/named.conf that really means /var/named/chroot/etc/named.conf

 

another quicky from J to the Y

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)