DNS Server

Guides for creating authoritative DNS servers and DNS caches using djbdns.

djbdns is a simple and security-aware DNS implementation created by Daniel J. Bernstein.

It comprises a number of server applications for the various DNS functions:

  • dnscache -- the dns resolver and cache.
  • tinydns -- a database-driven dns server.
  • walldns -- a "reverse DNS wall", providing IP to domain name lookup only.
  • rbldns -- a server designed for dns blacklisting service.
  • axfrdns -- a zone-transfer server.

As well as a number of client programs:

  • axfr-get -- a zone-transfer client.
  • dnsip -- simple address from name lookup.
  • dnsipq -- address from name lookup with rewriting rules.
  • dnsname -- simple name from address lookup.
  • dnstxt -- simple text record from name lookup.
  • dnsmx -- mail exchanger lookup.
  • dnsfilter -- looks up names for addresses read from stdin, in parallel.
  • dnsqr -- recursive general record lookup.
  • dnsq -- non-recursive general record lookup, useful for debugging.
  • dnstrace (and dnstracesort) -- comprehensive testing of the chains of authority over dns servers and their names.

djbdns Installation
Before installing djbdns, you need to install daemontools.

Once that is installed, download the djbdns source tarball:

cd /extra/src
wget http://cr.yp.to/djbdns/djbdns-1.05.tar.gz
tar zxf djbdns-1.05.tar.gz
cd djbdns-1.05

Fix the errno problem:

sed -i '/extern int errno/{s/^/\/* /;s/$/ *\//;G;s/$/#include <errno.h>/;}' error.h

We're going to apply John Simpson's rbldns-patch as it will be used in our custom RBL.

wget http://qmail.jms1.net/djbdns/djbdns-1.05-combined.patch
patch -p1 < djbdns-1.05-combined.patch

Then make and install the programs:

make setup check

Once you have the software installed, you can proceed to configure tinydns, dnscache or rbldns for your purposes.

Recent Updates

  • 2 years 2 days ago
  • 2 years 2 days ago
  • 2 years 5 days ago
    php 8.x
  • 2 years 6 days ago
    10.6.7
  • 2 years 1 week ago
    Drop Centos 5/6 stuff