Logotipo del grupo GSO

4. Ejemplos de ficheros de configuración de Bind

Estos son los ficheros completos de configuración de uno de los servidores dns que hemos configurado. Se incluyen los comentarios originales para una mejor comprensión del significado de algunas de las directivas de configuración.

4.1. /etc/bind/named.conf

	  
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind/README.Debian for information on the 
// structure of BIND configuration files in Debian for BIND versions 8.2.1 
// and later, *BEFORE* you customize this configuration file.
//

acl miacl {
	192.168.1.0/24;
	127.0.0.1;
};

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 {
		193.146.96.2;
		193.146.96.3;
	};

	allow-transfer {
		miacl;
	};

	allow-query {
		miacl;
	};

	listen-on {
		miacl;
	};
};

// reduce log verbosity on issues outside our control
logging {
	category lame-servers { null; };
	category cname { null; };
};

// 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";
};

// add entries for other zones below here

zone "uimagen.iaf" {
        type master;
        file "/etc/bind/db.uimagen.iaf";
};

zone "1.168.192.in-addr.arpa" {
	type master;
	file "/etc/bind/rev.192.168.1";
};

4.2. /etc/bind/db.uimagen.iaf

	  
;
; BIND data file for uimagen.iaf. 
;
@       IN      SOA     uimagen.iaf. root.uimagen.iaf. (
                  2001131102; Serial
                  604800    ; Refresh
                  86400     ; Retry
                  2419200   ; Expire
                  604800 )  ; Default TTL
;
             IN  NS  dns.uimagen.iaf.
;
www          IN  A  192.168.1.1
dns          IN  A  192.168.1.1
dns2         IN  A  192.168.1.2
ftp          IN  A  192.168.1.1
cancerbero   IN  A  192.168.1.1
sanpedro     IN  A  192.168.1.2

4.3. /etc/bind/rev.192.168.1

;
; BIND reverse data file for 192.168.1.0
;
@       IN      SOA    uimagen.iaf. root.uimagen.iaf. (
                  2001131102; Serial
                  604800    ; Refresh
                  86400     ; Retry
                  2419200   ; Expire
                  604800 )  ; Default TTL
;
    IN  NS    dns.uimagen.iaf.
    IN  NS    dns2.uimagen.iaf.
1   IN  PTR   www.uimagen.iaf.
1   IN  PTR   ftp.uimagen.iaf.
1   IN  PTR   dns.uimagen.iaf.
2   IN  PTR   dns2.uimagen.iaf.
1   IN  PTR   cancerbero.uimagen.iaf.
2   IN  PTR   sanpedro.uimagen.iaf.