setup djbdns dnscache on debian squeeze



1) install squeeze packages
apt-get install daemontools daemontools-run ucspi-tcp


2) install lenny/sid djbdns package
Package: djbdns (1:1.05-8 and others)
eg:
wget http://ftp.cz.debian.org/debian/pool/main/d/djbdns/djbdns_1.05-8_amd64.deb
dpkg -i djbdns_1.05-8_amd64.deb


3) create users/group
/usr/sbin/groupadd -g 88 djbdns
/usr/sbin/useradd -s /bin/false -d /dev/null -u 88 -g 88 dnsrun
/usr/sbin/useradd -s /bin/false -d /dev/null -u 89 -g 88 dnslog


4) configure dnscache (example for local network)
dnscache-conf dnsrun dnslog /etc/dnscache 192.168.1.1
ln -s /etc/dnscache /etc/service

check if is running
ps -aux | grep dnscache


5) in /etc/dnscache/root/ip set which IP/networks should response - eg. for network 192.168.1.0/24:
cd /etc/dnscache/root/ip
touch 192.168.1

restart dnscache:
svc -t /service/dnscache


6) set resolver to dnscache
echo "nameserver 192.168.1.1" > /etc/resolv.conf
and for dhcp server add line to its configuration file
option domain-name-servers 192.168.1.1;
Last update:
2011-12-23 12:37
Author:
Daniel
Revision:
1.1
Average rating:0 (0 Votes)

You can comment this FAQ

Chuck Norris has counted to infinity. Twice.