Configuración

Los archivos de configuración del DNS están guardados en el directorio /etc/bind . El archivo de configuración principal es /etc/bind/named.conf. El contenido del archivo de configuración por defecto se muestra debajo:

// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the 
// structure of BIND configuration files in Debian, *BEFORE* you customize 
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local

include "/etc/bind/named.conf.options";

// prime the server with knowledge of the root servers
zone "." {
	type hint;
	file "/etc/bind/db.root";
};

// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912

zone "localhost" {
	type master;
	file "/etc/bind/db.local";
};

zone "127.in-addr.arpa" {
	type master;
	file "/etc/bind/db.127";
};

zone "0.in-addr.arpa" {
	type master;
	file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
	type master;
	file "/etc/bind/db.255";
};

// zone "com" { type delegation-only; };
// zone "net" { type delegation-only; };

// From the release notes:
//  Because many of our users are uncomfortable receiving undelegated answers
//  from root or top level domains, other than a few for whom that behaviour
//  has been trusted and expected for quite some length of time, we have now
//  introduced the "root-delegations-only" feature which applies delegation-only
//  logic to all top level domains, and to the root domain.  An exception list
//  should be specified, including "MUSEUM" and "DE", and any other top level
//  domains from whom undelegated responses are expected and trusted.
// root-delegation-only exclude { "DE"; "MUSEUM"; };

include "/etc/bind/named.conf.local";

La línea include especifica el archivo que contiene las opciones del DNS. La línea directory en el archivo de opciones de dice al DNS donde buscar los archivos. Todos los archivos usados por BIND serán relativos a ese directorio.

El archivo /etc/bind/db.root describe los servidores de nombre raíz que hay en el mundo. Los servidores cambian con el tiempo, por lo que el archivo /etc/bind/db.root debe mantenerse ahora y en el futuro.

La sección zone define un servidor maestro, y se almacena en un archivo mencionado en la etiqueta file. Cada archivo de zona contiene tres registros de recurso (RRs): un RR SOA, un RR NS y un RR PTR. SOA viene de Start of Authority («Inicio de autoridad»). La «@» es una notación especial que significa el origen. NS es el RR para el Servidor de Nombres. PTR es el Domain Name Pointer («Puntero al nombre de dominio»). Para arrancar el servidor DNS, ejecute la siguiente orden desde la línea de órdenes de una terminal:

sudo /etc/init.d/bind9 start

Para más detalles puede accedar a la documentación mencionada en la sección de referencias.