My friend just install dns server using djbdns, he use two component in djbdns:
- tinydns
- dnscache
After follow all setup in tutorial, he try to test the dnscache :
mail# dig yahoo.com
; <<>> DiG 9.3.4-P1 <<>> yahoo.com
;; global options: printcmd
;; connection timed out; no servers could be reached
mail#
checking service, maybe not running :
mail# ps -ax | grep dns
580 ?? I 0:00.00 supervise tinydns
582 ?? I 0:00.00 supervise dnscache
878 ?? I 0:00.01 /usr/local/bin/dnscache
880 ?? I 0:00.00 /usr/local/bin/tinydns
914 p0 R+ 0:00.00 grep dns
mail# /usr/local/etc/rc.d/svscan.sh restart
Stopping svscan.
Starting svscan.
seem ok now, try again :
mail# dig yahoo.com
; <<>> DiG 9.3.4-P1 <<>> yahoo.com
;; global options: printcmd
;; connection timed out; no servers could be reached
Something wrong, I check another suspicious place :
mail# cd /etc/dnscache/root/ip/
mail# ls
127.0.0.1
Hmm….
add access to network to use dnscache :
mail# touch 192.168.1
mail# ls
127.0.0.1 192.168.1
trying again :
mail# /usr/local/etc/rc.d/svscan.sh restart
Stopping svscan.
Starting svscan.
mail# dig rasyid.net
; <<>> DiG 9.3.4-P1 <<>> rasyid.net
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49008
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;rasyid.net. IN A
;; ANSWER SECTION:
rasyid.net. 3600 IN A 74.86.117.224
;; Query time: 2169 msec
;; SERVER: 192.168.1.14#53(192.168.1.14)
;; WHEN: Thu Feb 14 08:26:25 2008
;; MSG SIZE rcvd: 44
mail#
Good, now he know little secret to make dnscache work 🙂
P.S :
touch 192.168.1 (give access to all network with address 192.168.1.0 – 192.168.1.254)
touch 192.168 (give access to all network with address 192.168.xxx.yyyy – 192.168.zzzz.aaaa)
Happy Valentine 🙂