DNS-Konfiguration für mehrstufige delegierte Subdomäne ohne Internetzugang

DNS-Konfiguration für mehrstufige delegierte Subdomäne ohne Internetzugang

Ich verwende Bind 9 unter Debian. Ich habe einen Master und einen Sekundärserver.

Meine Domänennamen sind wie folgt aufgebaut:

  • mein-host-1.mein-projekt.mein-corp.com
  • mein-Host-2.Bereich-1.mein-Projekt.mein-Corp.com
  • mein-Host-3.Bereich-2.mein-Projekt.mein-Corp.com

Meine Nameserver sind maßgebend für:

  • mein-projekt.my-corp.com
  • area-1.mein-projekt.mein-corp.com
  • bereich-2.mein-projekt.mein-corp.com

Meine Nameserver sindnichtmaßgebend fürwww.my-corp.comund ich habe keine Administratorrechte für die Nameserver, die maßgebend sind fürwww.my-corp.com.

Also, diewww.my-corp.comNameserver delegieren Anfragen für meine Domains an meine Nameserver, und meine Nameserver leiten Anfragen, die sie nicht direkt beantworten können, an diewww.my-corp.comNameserver. Diese Vereinbarung ist nicht optional. Sie wird von der IT-Abteilung meines Unternehmens verlangt. Daher können meine Nameserver insbesondere keine iterativen Abfragen durchführen oder auf andere Weise einen Nameserver im Internet erreichen.

Derwww.my-corp.comNameserver haben die folgenden IP-Adressen:

  • 10.0.0.1/24 (primär)
  • 10.0.0.2/24 (sekundär)

Der mir zugeteilte IP-Adressblock ist10.1.0.0/23Dies ist für die umgekehrte Auflösung relevant.

Meine Nameserver haben die folgenden IP-Adressen und Hostnamen:

  • 10.1.0.1/23, ns1.my-project.my-corp.com (primär)
  • 10.1.1.1/23, ns2.my-project.my-corp.com (sekundär)

Die Konfiguration meines primären Nameservers ist wie folgt:

options {
        directory "/etc/bind";
        forward only;
        forwarders {
                10.0.0.1; 10.0.0.2;
        };

zone "my-project.my-corp.com" {
   type master;
   file "db.my-project.my-corp.com";
};

zone "0.1.10.in-addr.arpa" {
   type master;
   file "db.10.1.0";
};

zone "1.1.10.in-addr.arpa" {
   type master;
   file "db.10.1.1";
};

// ALL OF THE FOLLOWING IS DEFAULT IN BIND 9.

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

Meine Masterzonendatei fürmein-projekt.my-corp.comist wie folgt:

$TTL 3h

my-project.my-corp.com.   IN   SOA   ns1.my-project.my-corp.com. root.localhost. (
   2018010500 ; Serial
   3h         ; Refresh
   1h         ; Retry
   1w         ; Expire
   3h     )   ; Negative Cache TTL

my-project.my-corp.com.   IN   NS   ns1.my-project.my-corp.com.
my-project.my-corp.com.   IN   NS   ns2.my-project.my-corp.com.

ns1.my-project.my-corp.com.                IN   A   10.1.0.1
ns2.my-project.my-corp.com.                IN   A   10.1.1.1
my-host-1.my-project.my-corp.com.          IN   A   10.1.0.2
my-host-2.area-1.my-project.my-corp.com.   IN   A   10.1.0.3
my-host-3.area-2.my-project.my-corp.com.   IN   A   10.1.1.2

Meine Masterzonendatei für0.1.10.in-addr.arpaist wie folgt:

$TTL 3h

0.1.10.in-addr.arpa.   IN   SOA   ns1.my-project.my-corp.com. root.localhost. (
   2018010500 ; Serial
   3h         ; Refresh
   1h         ; Retry
   1w         ; Expire
   3h     )   ; Negative Cache TTL

0.1.10.in-addr.arpa.     IN   NS    ns1.my-project.my-corp.com.
0.1.10.in-addr.arpa.     IN   NS    ns2.my-project.my-corp.com.

1.0.1.10.in-addr.arpa.   IN   PTR   ns1.my-project.my-corp.com.
2.0.1.10.in-addr.arpa.   IN   PTR   my-host-1.my-project.my-corp.com.
3.0.1.10.in-addr.arpa.   IN   PTR   my-host-2.area-1.my-project.my-corp.com.

Meine Masterzonendatei für1.1.10.in-addr.arpaist wie folgt:

$TTL 3h

1.1.10.in-addr.arpa.   IN   SOA   ns1.my-project.my-corp.com. root.localhost. (
   2018010500 ; Serial
   3h         ; Refresh
   1h         ; Retry
   1w         ; Expire
   3h     )   ; Negative Cache TTL

1.1.10.in-addr.arpa.     IN   NS    ns1.my-project.my-corp.com.
1.1.10.in-addr.arpa.     IN   NS    ns2.my-project.my-corp.com.

1.1.1.10.in-addr.arpa.   IN   PTR   ns2.my-project.my-corp.com.
2.1.1.10.in-addr.arpa.   IN   PTR   my-host-3.area-2.my-project.my-corp.com.

Ich habe zwei Fragen.

FRAGE 1

Ist es in Ordnung, Hosts ausmein-projekt.my-corp.comund seine beiden Subdomänen direkt in derselben Zone, wie ich es oben getan habe?

FRAGE 2

Da meine Nameserver das Internet nicht erreichen können, wie soll ich mit Root-Nameservern umgehen? Soll ich sie einfach gar nicht konfigurieren, da ich nie eine iterative Abfrage durchführen werde? Wenn sie definiert werden müssen, wiesollenIch definiere sie?

Antwort1

F2: Wie sollte ich mit Root-Nameservern umgehen?

Sie haben forward only;zusammen mit Weiterleitungen festgelegt, dass die Stammhinweise nicht verwendet werden.

Ist es in Ordnung, Hosts von my-project.my-corp.com einzusetzen?

Ja, das ist völlig in Ordnung. Sie müssen keine zusätzlichen Zonendateien erstellen, es sei denn, Sie müssen die Zonen von unterschiedlichen Nameservern verwalten lassen oder unterschiedliche Abfrageoptionen oder ähnliches haben.

Sie können Ihre Zone einfacher aussehen lassen, wenn Sie auf das Anhängen der Zone und die Erwähnung von „IN“ verzichten.

$TTL 3h
@  SOA   ns1.my-project.my-corp.com. root.localhost. (
   2018010500 ; Serial
   3h         ; Refresh
   1h         ; Retry
   1w         ; Expire
   3h     )   ; Negative Cache TTL

@  NS   ns1
@  NS   ns2
ns1               A   10.1.0.1
ns2               A   10.1.1.1
my-host-1         A   10.1.0.2
my-host-2.area-1  A   10.1.0.3
my-host-3.area-2  A   10.1.1.2

verwandte Informationen