## dnscache/README
## configuration notes for dnscache service directory
## wcm, 2005.10.28 - 2009.12.28
## ===

The dnscache service directory has particular requirements
and conventions.  Usually it is generated automatically by the
`dnscache-conf' utility in the djbdns package.

Since the dnscache service here was prepared specifically as
an installable perp service, it was not generated by the
dnscache-conf utility.  Instead, the general defaults for a
local dnscache were used, as well as a random seed generator
built into the runscript.

The brief notes below provide a few hints as to what is
required for this service, as well as what may be configured
for a dnscache service.  For the full story, please read the
complete documentation at http://cr.yp.to/djbdns.html.

1. Configured by the commented runenv(8) envfile in ./dnscache.env:

  CACHESIZE: memory reserved for dnscache caching
             default: 1000000

         IP: the ip address on which dnscache will listen
             default: 127.0.0.1 (for local cache)
                  or: my ip address for external cache

     IPSEND: the ip address on which dnscache sends outgoing queries
             default: 0.0.0.0 

       ROOT: runtime chroot directory for dnscache
             default: CWD/root


2. Also required in service directory:

  seed: chmod 0600 file with 128 bytes of random data

    generate with rand(1) in the OpenSSL package:

        # openssl rand -out ./seed -rand /dev/urandom 128
        # chmod 0600 ./seed

    or the `rc.main' script will generate it automatically with:

        # dd if=/dev/urandom of=./seed bs=128 count=1
        # chmod 0600 ./seed


  root/: chmod 2755 directory, containing:
      ip/
          127.0.0.1
          (and touch any other permitted to use cache)

      servers/
          @  (the list of dns root servers)
          (and any other specific nameserver lists)


3. Updating DNS root servers:

The ./rc.main script contains a "make_roots" target that can be
used to update the DNS root servers.  From within this service
directory, run the following command:

  ./rc.main "make_roots"

This will query the top level DNS root servers and update the
file in ./root/servers/@.

### EOF
