Setting Up a Local Caching Name Server at Stanford (updated September 3, 2019)



Setting up a caching name server is easy and fun. Well it's easy. All you need to do is install the name server software, copy the configuration file provided here to the appropriate location, start the name server program, and make a simple change to your resolver configuration.

 


Configuration Files

/etc/named.conf or maybe /etc/bind/named.conf (download)
//
// named.conf file for local caching servers at Stanford
//   forwarding only - even works on hosts using RFC 1918 addresses
//

options {
        // *local queries only*
        listen-on-v6            { ::1; };
        listen-on               { 127.0.0.1; };
        allow-query             { ::1; 127.0.0.1; };
        // forward *only* and use the Stanford anycast DNS service as forwarders
        forward                 only;
        forwarders              { 2607:f6d0:0:53::67:53; 2607:f6d0:0:53::64:53; 171.64.1.234; 171.67.1.234; };
        // rely on the forwarders for DNSSEC validation
        dnssec-validation       no;
};

// this is a very simple server, so turn off remote administration
controls {};

/etc/resolv.conf (download)

    Use this file as-is or add the nameserver entries to your /etc/resolv.conf before any other nameserver entries.

# resolver configuration file for systems with a local caching server

domain stanford.edu
search stanford.edu sunet

# local server first, then the Stanford anycast service IPs

nameserver 127.0.0.1
nameserver 171.64.1.234
nameserver 171.67.1.234