Pseudo second level domain Basics

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen

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.22
mail    IN A       10.88.213.23
fw      IN A       10.88.213.1
db      IN A       10.88.213.24
app     IN A       10.88.213.25
git     IN A       10.88.213.26
monitor IN A       10.88.213.27
  • 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.
22      IN PTR     www.it213.int.
23      IN PTR     mail.it213.int.
24      IN PTR     db.it213.int.
25      IN PTR     app.it213.int.
26      IN PTR     git.it213.int.
27      IN PTR     monitor.it213.int.

Server starten

  • systemctl restart bind9

Test

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