Important File Locations



Important File Locations

Red Hat/Fedora BIND normally runs as the named process owned by the unprivileged named user.

Sometimes BIND is also installed using Linux's chroot feature to not only run named as user named, but also to limit the files named can see. When installed, named is fooled into thinking that the directory /var/named/chroot is actually the root or / directory. Therefore, named files normally found in the /etc directory are found in /var/named/chroot/etc directory instead, and those you'd expect to find in /var/named are actually located in /var/named/chroot/var/named.

The advantage of the chroot feature is that if a hacker enters your system via a BIND exploit, the hacker's access to the rest of your system is isolated to the files under the chroot directory and nothing else. This type of security is also known as a chroot jail.

You can determine whether you have the chroot add-on RPM by using this command, which returns the name of the RPM:

     [root@bigboy tmp]# rpm -q bind-chroot
     bind-chroot-9.2.3-13
     [root@bigboy tmp]#

There can be confusion with the locations: Regular BIND installs its files in the normal locations, and the chroot BIND add-on RPM installs its own versions in their chroot locations. Unfortunately, the chroot versions of some of the files are empty. Before starting Fedora BIND, copy the configuration files to their chroot locations:

     [root@bigboy tmp]# cp -f /etc/named.conf /var/named/chroot/etc/
     [root@bigboy tmp]# cp -f /etc/rndc.* /var/named/chroot/etc/

Before you go to the next step of configuring a regular name server, it is important to understand exactly where the files are located. Figure provides a map.

Differences in Fedora and Red Hat DNS File Locations

File

Purpose

BIND chroot Location

Regular BIND Location

named.conf

Tells the names of the zone files to be used for each of your Web site domains

/var/named/chroot/etc

/etc

rndc.key, rndc.conf

Named authentication

/var/named/chroot/etc

/etc

zone files

Link all the IP addresses in your domain to their corresponding servers

/var/named/chroot/var/named

/var/named


Note

Fedora Core installs BIND chroot by default. Red Hat 9 and earlier versions don't.