Stanford::DNSserver - A DNS Name Server Framework for Perl

Stanford::DNSserver is an extensive rewrite of the DNS name server code from the original lbnamed. On its way to becoming a module the code was sanitized and modernized. Various patches and suggestions that rolled in over the years were applied and put to good use. The result is a module that's easy to use for implementing lbnamed or any other perl-powered DNS server. Grab the tarball today.

Converting your classic lbnamed to Stanford::DNSserver is easy. Your existing lbnamed.conf will be the new main program. Copy it to a new file and make the following changes:

Use the new module to get the goodies necessary to build a name server.

use Stanford::DNS;
use Stanford::DNSserver;
Generate a new name server object.

$ns = new Stanford::DNSserver
          listen_on =>   [$hostname],
          pidfile   => "",
          logfunc   =>       \&logit,
          loopfunc  =>     \&refresh,
          exitfunc  =>     \&cleanup
Change the LBDB:: calls to Stanford::DNSserver object method invocations. For example, this

LBDB::add_dynamic("" => \&handle_lb_request);
becomes this:

$ns->add_dynamic("" => \&handle_lb_request);
Finally, start the name server.

That's all there is to it! Share and enjoy.
Last modified: April 8, 2006