:: djbdns on Linux Debian
:: What is djbdns
The djbdns software package is a DNS implementation created by Daniel J. Bernstein due to his frustrations with repeated BIND security holes. – wikipedia
:: Installing dependency
# aptitude install daemontools daemontools-run ucspi-tcp
:: Installing djbdns / tinydns on debian
# mkdir packages # cd packages/ # wget //cr.yp.to/djbdns/djbdns-1.05.tar.gz # tar -xzf djbdns-1.05.tar.gz # cd djbdns-1.05/ # echo gcc -O2 -include /usr/include/errno.h > conf-cc # make # make setup check
:: running DNS Server
# useradd Gtinydns # useradd Gdnslog # tinydns-conf Gtinydns Gdnslog /etc/tinydns 10.100.100.80 # mkdir /etc/service/ # ln -s /etc/tinydns /etc/service/tinydns # svstat /etc/service/tinydns
:: delegation
# cd /etc/service/tinydns/root/ # ./add-ns mee.com 10.100.100.80 # ./add-ns 100.100.10.in-addr.arpa 10.100.100.80 # make
:: add DNS record
+command line
# cd /etc/service/tinydns/root # ./add-host mee.com 10.100.100.80 # ./add-alias www.mee.com 10.100.100.80 # ./add-alias ftp.mee.com 10.100.100.80 # ./add-mx mail.mee.com 10.100.100.80 # make
+edit data files
# cd /etc/service/tinydns/root # vi data ### mee.com ################# .mee.com:10.100.100.80:ns.mee.com:259200 .100.100.10.in-addr.arpa:10.100.100.80:a:259200 =mee.com:10.100.100.80:86400 +www.mee.com:10.100.100.80:86400 +ftp.mee.com:10.100.100.80:86400 @mail.mee.com:10.100.100.80:a::86400 ### jonno.com ############## .jonno.com::ns1.mee.com .jonno.com::ns2.mee.com @jonno.com::mail.jonno.com::86400 +jonno.com:10.100.100.80:86400 +www.jonno.com:10.100.100.80:86400 +mail.jonno.com:10.100.100.80:86400 +ftp.jonno.com:10.100.100.80:86400 # make
:: Checking DNS records
+A record
# tinydns-get a www.mee.com 1 www.mee.com: 78 bytes, 1+1+1+1 records, response, authoritative, noerror query: 1 www.mee.com answer: www.mee.com 86400 A 10.100.100.80 authority: mee.com 259200 NS ns.mee.com additional: ns.mee.com 259200 A 10.100.100.80
+Ptr record
# tinydns-get ptr 100.100.10.in-addr.arpa. 12 100.100.10.in-addr.arpa: 93 bytes, 1+0+1+0 records, response, authoritative, noerror query: 12 100.100.10.in-addr.arpa authority: 100.100.10.in-addr.arpa 2560 SOA a.ns.100.100.10.in-addr.arpa hostmaster.100.100.10.in-addr.arpa 1311318815 16384 2048 1048576 2560
Do not use nslookup to test your DNS servers.