DNS cache

dnscache-conf dnscache dnslog /etc/dnscache 192.168.2.1

ln -s /etc/dnscache /service

touch /etc/dnscache/root/ip/192.168.2

!dns server tinydns-conf tinydns dnslog /etc/tinydns 192.168.3.2

ln -s /etc/tinydns /service

cp navi-dns-data /service/tinydns/root/data

make

SVC commands:

svc -d /service/tinydns  - kill process

svc -u /service/tinydns  - start process

svc -t /service/tinydns  - restart process

References: http://cr.yp.to/daemontools/svc.html

Automatic SSH Synching of Data

tinydns Makefile with included ssh commands:

remote: data.cdb

      rsync -az -e "ssh -i /home/adm/.ssh/id_dsa" data.cdb first.remote.host.here.com:/etc/tinydns/root/data.cdb
      rsync -az -e "ssh -i /home/adm/.ssh/id_dsa" data.cdb second.remote.host.here.com:/etc/tinydns/root/data.cdb

data.cdb: data

      /usr/local/bin/tinydns-data

Running make will kick off the ssh synch command.

I created a ~tinydns/.ssh directory, made /etc/tinydns and /etc/tinydns/root owned by tinydns. I modified the Makefile in tinydns/root to rsync the data and data.cdb files over. This is setup the same way on both servers so you can edit from each server and make it out to the other. This is using identity files in /etc/tinydns/.ssh and the password is currently ***'s root.

Configuration

computer/djbdns.txt ยท Last modified: by 127.0.0.1