Friday, May 05, 2006
dnscache on a hetzner root server using Debian
How to run dnscache on a hetzner root server using Debian.
- Install daemontools
- Install djbdns$ apt-get install djbdns-installer
$ get-djbdns
$ build-djbdns
$ /etc/init.d/djbdns stop # stop it
$ rm /etc/init.d/djbdns # remove it
$ update-rc.d -f djbdns remove # remove startup links - Setup dnscache (user setup was already done by Debian)$ dnscache-conf dnscache dnslog /service/dnscache
- Configure hetzner's nameservers as "root name servers"$ cat <<EOF > /service/dnscache/root/servers/@
213.133.98.98
213.133.99.99
213.133.100.100
EOF - Set FORWARDONLY option$ echo 1 > /service/dnscache/env/FORWARDONLY
- Restart dnscache$ svc -t /service/dnscache
- Edit your resolv.conf$ echo "nameserver 127.0.0.1" > /etc/resolv.conf">
- Use it and watch it$ dnsip kde.org
$ tail -f /service/dnscache/log/main/current