¡Esta es una revisión vieja del documento!
Por Félix Molinuevo, FMSI Sistemas de Informática
Lo primero es instalar el demonio, y algunos utilitarios. En Debian y derivados:
aptitude install bind9 dnsutils
Luego, agregar en /etc/bind los archivos para la zona forward y reverse a crear, cambiando en todos los lugares necesarios por los valores adecuados. En este caso la zona es “tomate”:
$ORIGIN . $TTL 86400 ; 1 day 11.168.192.in-addr.arpa IN SOA srv11.tomate. root.srv11.tomate. ( 961703055 ; serial 30 ; refresh (30 seconds) 600 ; retry (10 minutes) 604800 ; expire (1 week) 86400 ; minimum (1 day) ) NS srv11.tomate. $ORIGIN 11.168.192.in-addr.arpa. 1 PTR srv11.tomate.
$ORIGIN . $TTL 86400 ; 1 day tomate IN SOA srv11.tomate. root.srv11.tomate. ( 961902882 ; serial 30 ; refresh (30 seconds) 600 ; retry (10 minutes) 604800 ; expire (1 week) 86400 ; minimum (1 day) ) NS dns.tomate. MX 0 correo.tomate. $ORIGIN tomate. srv11 A 192.168.11.1 dns A 192.168.11.1 servidor CNAME srv11 correo CNAME srv11
Finalmente modificar los siguientes archivos de configuración de Bind:
// // Do any local configuration here // // Consider adding the 1918 zones here, if they are not used in your // organization //include "/etc/bind/zones.rfc1918"; zone "tomate" { type master; file "/etc/bind/db.tomate"; allow-update { localhost; }; }; zone "11.168.192.in-addr.arpa" { type master; file "/etc/bind/db.192.168.11"; allow-update { localhost; }; };
options { directory "/var/cache/bind"; // If there is a firewall between you and nameservers you want // to talk to, you might need to uncomment the query-source // directive below. Previous versions of BIND always asked // questions using port 53, but BIND 8.1 and later use an unprivileged // port by default. // query-source address * port 53; // If your ISP provided one or more IP addresses for stable // nameservers, you probably want to use them as forwarders. // Uncomment the following block, and insert the addresses replacing // the all-0's placeholder. forwarders { 172.16.11.201; 172.16.11.2; }; auth-nxdomain no; # conform to RFC1035 };
Nota: es muy importante prestar cuidadosa atención al editar esos archivos. Una coma, punto, espacio o cualquier cosa de más o de menos, hará que el servicio no funcione.