Pages

Thursday, September 27, 2012

How to install djbdns in Debian Squeeze as deb package

Djbdns deb package is missing from latest Debian release (squeeze). There is a discussion regarding rapid dns cache poisoning attack which prevented djbdns package to be included in Debian squeeze release. There are two packages for djbdns in debian - djbdns which is original package of djbdns + 3 minor patches fixing some problems and dbndns which is debian fork of djbdns + ipv6 support patch. If you need ipv6 support in your dns install dbndns, if you don't need it i suggest you to install djbdns package.

Here is how can you install it on Debian squeeze as a deb package.

Add this line to /etc/apt/sources.list

deb-src http://ftp.bg.debian.org/debian/ sid main non-free contrib

You can choose another debian mirror if you like.

# apt-get update
# apt-get source djbdns

This will download source of the package and unpack it in your current directory. We need build-essential meta package installed so we can build some custom packages.

# apt-get install build-essential

Now all we need is to enter the directory of the unpacked djbdns package and run:

# dpkg-buildpackage -uc -rfakeroot

If there is no error the result of the above command will produce djbdns_1.05-8_i386.deb package which contains tinydns, dnscache, axfrdns ... etc. and dnscache-run_1.05-8_all.deb which contains run scripts for daemontools. All you need is to install them as follow:

# dpkg -i djbdns_1.05-8_i386.deb dnscache-run_1.05-8_all.deb

Just to be sure that nothing goes wrong after upgrade we need to 'hold' these packages