Responses can be authoritative, coming from an authoritative server, or not, coming from a caching server. They can also be truncated, which means that not all of the information available from the server fit in the 512 byte limit.
Resource records can be A or address records, providing the IP address of an FQDN; NS records, which describe name servers to go to for more information; PTR or "pointer" records, which provide the FQDN associated with an IP address; or CNAME records, which provide "canonical names", or aliases. Responses also provide a time for which the data is to be trusted. If a domain name does not exist, the response is NXDOMAIN: non-existant domain.
Primary and secondary servers can also be caching servers for zones for which they are not authoritative.
For instance, if the local domain is "lab265" and the search domains are "rwc.uc.edu" and "uc.edu", the lookup of "mickey.mouse" would involve queries for:
Note that a search for "mickey.mouse." would only involve the first lookup.
The use of search domains is discouraged, since it can result in excessive waits for DNS lookups.
97.122.137.129.in-addr.arpaYou can also perform this query using "dig -x 129.137.122.97".
mount -wo remount /
cd /usr/src
tar -xjf bind-9.2.3.tar.bz2
cd bind-9.2.3
./configure --prefix=/usr --sysconfdir=/etc &&
make &&
make install
groupadd named &&
useradd -m -g named -s /bin/false named
cd /home/named &&
mkdir -p dev etc/namedb var/run &&
mknod /home/named/dev/null c 1 3 &&
mknod /home/named/dev/random c 1 8 &&
chmod 666 /home/named/dev/{null,random} &&
cp /etc/localtime /home/named/etc
cd
chown -R named.named /home/named
cat > /etc/rc.d/init.d/bind << "EOF"
#!/bin/sh
. /etc/sysconfig/rc
. $rc_functions
case "$1" in
start)
logecho "Starting named..."
loadproc /usr/sbin/named -u named -t /home/named -c \
/etc/named.conf
;;
stop)
logecho "Stopping named..."
killproc /usr/sbin/named
;;
restart)
$0 stop
sleep 1
$0 start
;;
reload)
logecho "Reloading named..."
/usr/sbin/rndc -c /etc/rndc.conf reload
;;
status)
statusproc /usr/sbin/named
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
EOF
chmod 754 /etc/rc.d/init.d/bind
mount -ro remount /
This installation method installs named in a "chroot jail" located in /home/named. The directories
and files installed in /home/named permit named to be run with /home/named as its root directory.
This means that if named is compromised, the hacker has no access to any other directory or file
on the system.
"dig @(host) AXFR lab265" can be used to test access through TCP.
This can be accomplished automatically using the following command:
ln -s /etc/rc.d/init.d/bind /etc/rc.d/rc3.d/S22bind
©2005, Kenneth R. Koehler. All Rights Reserved. This document may be freely reproduced provided that this copyright notice is included.
Please send comments or suggestions to the author.