Clean djbDNS DNS Server On CentOS - dnscache And tinydns - A To Z What is djbDNS? And why do we use djbDNS?

There is a new point of view to serve the dns service - each of the dns server functionalities is a separate service, like authority, cache, forward and so on. The other difference is the daemon-too ls which will rapidly restart services to prevent zombies.

Requirements: CentOS 5.4 clean installation Log in as root. # yum update # yum install gcc # mkdir pkg # cd pkg The first step is to install the daemon-tools: # cd ~/pkg # wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz # gunzip daemontools-0.76.tar # tar -xpf daemontools-0.76.tar # rm -f daemontools-0.76.tar # cd admin/daemontools-0.76 # vi src/conf-cc Append the following line at the end of the gcc line: -include /usr/include/errno.h # ./package/install One other package we need to prepare for djbdns to be functional is ucspi: # cd ~/pkg # wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz # gunzip ucspi-tcp-0.88.tar # tar -xf ucspi-tcp-0.88.tar # cd ucspi-tcp-0.88 # vi src/conf-cc Append the following line at the end of the gcc line: -include /usr/include/errno.h # make

05./script.tar.05.to/djbdns/doc.gz Next we will unzip docs under /doc: # gunzip < doc.sh # . tar -xf -) Use the following script to merge in system docs: #!/bin/sh for i in packages commands cfunctions fileformats do sort -f /dev/null `find /doc/merge -name $i.html done Save script into a file: script.new /doc/$i.tar # cd djbdns-1.new mv /doc/$i.yp.# make setup check The next step is the document publication: # cd ~/pkg # wget http://cr.to/djbdns/djbdns-1.05 # vi src/conf-cc Append the following line at the end of the gcc line: -include /usr/include/errno.gz # gunzip djbdns-1.tar.html` > /doc/$i.05.h # make # make setup check All compiling gets done. The next step is the dns server configuration.yp.sh # cd ~/pkg # wget http://cr.gz (cd /.tar. DNSCACHE Create two system user accounts: # useradd -d /var/dnscache -s /bin/false dnscache # useradd -d /var/dnscache -s /bin/false dnslog .sh # chmod +x script.tar # tar -xf djbdns-1.

/add-alias unagi./add-ns internal 192. The last step is the dns service startup: . because your clients are now able to be resolved in reverse mode./add-mx internal 192.20. you can make a reboot to be sure that all the world is in place.2 # . we need two system user accounts: # useradd -d /var/dnscache -s /bin/false tinydns # useradd -d /var/dnscache -s /bin/false tinylog # tinydns-conf tinydns tinylog /var/dnscache/tinydns 127.168.20.168.168. There is a point here that your are still not able to query from your cache serv er.192.1 # ./add-host mail.1 Now it's time to add nodes into dns database: # cd /var/dnscache/tinydns/root # .internal 192./add-host ns.168./add-ns 20.168.internal 192.. As mentioned before it's one of the dns-cache security features to reverse-check clients.2 # make These nodes with go to the database file /var/dnscache/tinydns/root/data that yo u are able to edit manually.168. DNSTINY Once again.20.0.20.2 # .internal 192.168.20.168.1 Allow the rest of your network to query dnscache: # touch /var/dnscache/dnscache/root/ip/<Net-ID> Example: touch /var/dnscache/dnscache/root/ip/192.168 Add dnscache to the list of services to be monitored by svscan: # ln -sf /var/dnscache/dnscache /service/ If you like ms-windows.1 # .20.arpa 192.in-addr.0. So in the next step we will work on tinydns to act for us.Configure the cache: # dnscache-conf dnscache dnslog /var/dnscache/dnscache <listen-IP> Example: dnscache-conf dnscache dnslog /var/dnscache/dnscache 192.1 # ..20.

# ln -sf /var/dnscache/tinydns /service .