Pseudo second level domain Basics: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 90: Zeile 90:
  
 
=Server starten=
 
=Server starten=
*systemctl restart bind9
+
*systemctl restart named
  
 
=Test=
 
=Test=

Version vom 16. März 2026, 14:45 Uhr

Klonen des Templates

Erstellen eines Nameservers laut Plan
Name ns.it213.int
Vorläufiger DNS ist der 192.168.X.88
Der Server ist autoritativ UND rekursiv

Installation

  • apt update
  • apt install bind9 bind9-utils

Auf den Nameservern

Optionen

  • cat /etc/bind/named.conf.options
options {
        directory "/var/cache/bind";

        forwarders { 192.168.X.88; };
        empty-zones-enable no;

        recursion yes;

        allow-query { any; };
};

Zonenfestlegung

  • cat /etc/bind/named.conf.local
zone "it213.int" IN {
     type master;
     file "it213.int";
};

zone "213.88.10.in-addr.arpa" IN {
     type master;
     file "213.88.10.in-addr.arpa";
};

Zonen selbst

  • cat /var/cache/bind/it213.int
$TTL 300
@           IN SOA  ns.it213.int. technik.xinux.de. (
                        2011090204
                        14400
                        3600
                        3600000
                        86400
                    )
        IN NS      ns
        IN MX 10   mail

ns        IN A       10.88.213.21
www       IN A       10.88.213.11
mail      IN A       10.88.213.3
fw        IN A       10.88.213.1
proxy     IN A       10.88.213.4
checkmk   IN A       10.88.213.5
revproxy  IN A       10.88.213.41
nextcloud IN A       10.88.213.8
docker    IN A       10.88.213.9
  • cat /var/cache/bind/213.88.10.in-addr.arpa
$TTL 300
@           IN SOA  ns.it213.int. technik.xinux.de. (
                        2011090204
                        14400
                        3600
                        3600000
                        86400
                    )
        IN NS      ns.it213.int.

1       IN PTR     fw.it213.int.
21      IN PTR     ns.it213.int.
11      IN PTR     www.it213.int.
3       IN PTR     mail.it213.int.
4       IN PTR     proxy.it213.int.
5       IN PTR     checkmk.it213.int.
8       IN PTR     nextcloud.it213.int.
9       IN PTR     docker.it213.int.
41      IN PTR     revproxy.it213.int.

Server starten

  • systemctl restart named

Test

Forward Lookup
  • dig www.it213.int
Reverse Lookup
  • dig -x 10.88.213.22