Bind Konfiguration

Eine Beispielkonfiguration für einen DNS-Server mit Bind.

Die SERIAL muss bei jeder Änderung min. um 1 erhöht werden. Ansonsten wird die Konfiguration vom Bind nicht neu eingelesen.

 

/etc/bind/named.conf

options {
        directory "/var/named";
        forwarders { 213.209.104.250;
                     213.209.104.220;
                     145.253.2.75;
                     193.174.32.18; };
};


zone "localhost" {
   type master;
   notify no;
   file "named.local";
};

zone "127.in-addr.arpa" {
   type master;
   notify no;
   file "named.127";
};

zone "example.org" {
   type master;
   notify no;
   file "named.hosts";
};

zone "1.168.192.in-addr.arpa" {
   type master;
   notify no;
   file "named.rev";
};

zone "." in {
   type hint;
   file "named.root";
};

 

/var/named/named.hosts

@   IN     SOA   dns.example.org. hostmaster.example.org. (
                 2011031100 ;      Serial
                 28800 ;           Refresh 8 hours
                 7200 ;            Retry 2 hours
                 604800 ;          Expire 7 days
                 86400 ) ;         Minimum TTL 1 day

                IN      NS      dns.example.org.

rechner1        IN      A       192.168.1.1
pc1             IN      CNAME   rechner1
computer1       IN      CNAME   rechner1

rechner2        IN      A       192.168.1.2
pc2             IN      CNAME   rechner2
computer2 IN CNAME rechner2
dns IN A 192.168.1.10 nameserver IN CNAME dns

 

/var/named/named.rev

$TTL 1d

1.168.192.in-addr.arpa. IN SOA dns.example.org. root.example.org. (
        2011031100 ; Serial (Seriennummer)
        3H         ; Refresh (Aktualisierung)
        1H         ; Retry (neuer Versuch)
        1M         ; Expire (ungueltig nach)
        1D )       ; min. TTL (mindeste Gueltig)

                IN  NS          dns.example.org.

1               IN  PTR         rechner1.example.org.
2               IN  PTR         rechner2.example.org.
10              IN  PTR         dns.example.org.

 

/var/named/named.local

;
; BIND data file for local loopback interface
;
$TTL    604800
@       IN      SOA     localhost. root.localhost. (
                              1         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      localhost.
@       IN      A       127.0.0.1

 

/var/named/named.127

;
; BIND reverse data file for local loopback interface
;
$TTL    604800
@       IN      SOA     localhost. root.localhost. (
                              1         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      localhost.
1.0.0   IN      PTR     localhost.
Neuen Kommentar hinzufügen

Sie können einen Kommentar abgeben, indem Sie das unten stehende Formular ausfüllen. Nur Text. Web- und E-Mail-Adressen werden in anklickbare Links umgewandelt.