Jump to content
Sign in to follow this  
hijinks

bind + chroot

Recommended Posts

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

 

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

 

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

 

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

Edited by Dungeon-Dave
Redid CODE tags for clarity

Share this post


Link to post
Share on other sites
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...