Intranet: setup DJBDNS to respond for *.local to help development


0. Follow instructions to setup a DNS Cache


1. Create an alias for eth0:

# nano /etc/network/interfaces

auto eth0:0
iface eth0:0 inet static

2 . restart networking

# /etc/init.d/networking restart


3. Use tinydns-conf to setup djbdns 

# tinydns-conf dnscache dnslog /etc/tinydns


# ln -svf /etc/tinydns /etc/service

# cd /etc/service/tinydns/root/



4. Setup the "local" domain name:

# ./add-ns local

#./add-host a.ns.local


5. Create the data file for tinydns

# cd /etc/service/tinydns/root/

# nano data



In the sample file above:
– is the IP address of the DNS server, so it is the one responsibe for domain name responses
– is the IP address of your future Web server
Save and update data/cdb
# make
6. Edit /etc/resolv.conf
search portnumber53.local



7. Let dnscache know about your *.local domain names:

# cd /etc/service/dnscache

# echo > root/servers/local

# chmod 644 root/servers/local


8. Restart dnscache

# svc -t .




Tagged , , , . Bookmark the permalink.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • IGlr