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

  • PHP
    1 year 4 months ago
    PHP 7.4
  • 1 year 5 months ago
    MariaDB 10.4.12
  • 1 year 5 months ago
    Dovecot 2.3.10
  • 1 year 5 months ago
    CentOS 6 revisions
  • 1 year 5 months ago
    Copy of the revision from Wed, 08/22/2018 - 13:39.