Ajout d’une zone dans bind9

Nous allons travailler dans une situation simple, dans un premier temps, nous n’utiliserons qu’un seul serveur DNS.

Du coups nous allons travailler dans les fichier suivants : named.conf.options, named.conf.local, db.home.local

/etc/bind/named.conf.options
dans ce fichier, nous allons configurer l’écoute du serveur

options {
        directory "/var/cache/bind";

        dnssec-validation auto;

        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };

        version none;
        listen-on { any; };
        allow-recursion { 127.0.0.1; };
        allow-query-cache { any; };
        additional-from-cache no;
};

Comme ceci il répondra sur toutes les interfaces pour les zone dont il fait autorité.

/etc/bind/db.home.local

j’utilise un nom de domaine bateau pour ce test, vous devrais bien entendu en mettre un qui existe et spécifier sur l’interface de votre hébergeur l »adresse de votre nouveau serveur.

$TTL 3600
@ IN SOA ns1.home.local. root.home.local. (
                        2014021501 ; SERIAL
                        172800; REFRESH
                        900; RETRY
                        1209600; EXPIRE
                        600 ) ; Negative Cache TTL

home.local. IN NS ns1.home.local.
ns1 IN A 192.168.1.111

home.local. IN A 1.2.3.4
www IN A 22.33.44.55

home.local. IN TXT "azeazeazeaz"

_sipfederationtls._tcp  IN SRV 100 1 5061 Sipfed.online.lync.com

home.local. IN SPF "v=spf1 include:mx1.home.local ~all"
home.local. IN MX 10 mx1.home.mocal.
mail IN A 33.1.2.3
smtp IN CNAME mail.home.local.
imap IN CNAME mail.home.local.

/etc/bind/named.conf.local

zone "home.local" {
    type master;
    file "/etc/bind/db.home.local";
    allow-query { any; };
    notify yes;
};

Bref, pour ajouter un nouvelle zone dans le bind il suffi :

  • De crée un nouveau fichier db.domain.tld
  • De rajouter la zone dans le fichier names.conf.local

 

Pour marque-pages : Permalien.

Les commentaires sont fermés.