Zum Inhalt springen

DNS Server BIND für Windows

    Hallo,

    man findet im Internet zwar genug Info zu dem DNS Server Bind, es ist aber selten das man alles was man sucht, auf der selben Seite findet.

    Darum stelle ich mal mein kleinen Tutorial hier rein.

    Ich verwende ihn allerdings ausschließlich für mein LAN, da ich hier mehrere Geräte habe, die nicht alle gut mit NetBios sind und ich mir Namen leichter merke als zahlen.

    Als man lädt sich mal BIND von http://www.bind9.net/download runter und entpackt es auf dem PC/Server, auf dem man es installieren möchte.

    Dort startet man BINDInstall.exe.

    bind_installer

    Standardpfad der Installation ist C:\Windows\system32\dns

    Dort werden dann die Unterverzeichnisse bin und etc angelegt.

    Nach der Installation läuft der DNS Server aber noch nicht.
    Es fehlt noch die Konfiguration.

    Dazu legt man erstmal das File named.conf im Ordner etc an.

    Inhalt könnte so aussehen
    [code]options {
    directory „C:\WINDOWS\system32\dns\etc“;
    pid-file „named.pid“;
    };

    zone „domain.local“ {
    type master;
    file „C:\WINDOWS\system32\dns\etc\domain.local.mas“;
    };

    zone „1.168.192.in-addr.arpa“ {
    type master;
    notify no;
    file „C:\WINDOWS\system32\dns\etc\LAN.rev“;
    };

    key „rndc-key“ {
    algorithm hmac-md5;
    secret „xWJwYI6DpBCA72B3FxqzBA==“;
    };

    controls {
    inet 192.168.1.1 port 953
    allow { 192.168.1.1; } keys { „rndc-key“; };
    };[/code]

    Dann das Zonen File domain.local.mas

    [code]$TTL 2D
    domain.local.       IN      SOA     ns.domain.local. webmaster.domain.local. (
    2010041341
    21600
    3600
    604800
    86400 )

    IN NS      ns.domain,local.        
    IN MX      10 mail.domain.local.
    ns              A       192.168.1.1
    ftp             CNAME   ns
    mail         CNAME   ns
    gw              A       192.168.1.254
                     TXT     „Network gateway“[/code]

    Und das File LAN.rev für Reverse Lookup

    [code]$TTL 3D
    @               IN      SOA     ns.domain.local. webmaster.domain.local. (
    2010041341
    21600
    3600
    604800
    86400 )
    NS      ns
    ns              A       192.168.1.1
    1        PTR    ns.domain.local.
    254        PTR    gw.domain.local[/code]

    Das File name.root kann man zB: hier runterladen:
    http://www.internic.net/zones/named.root

    Fehlt nur noch das File rndc.conf.

    Dazu führt man einfach das Kommando
    [code]C:\Windows\system32\dns\bin\rndc-confgen.exe[/code]
    auf der Command Line aus.

    Dabei sollte sowas rauskommen.

    [code]# Start of rndc.conf
    key „rndc-key“ {
    algorithm hmac-md5;
    secret „xWJwYI6DpBCA72B3FxqzBA==“;
    };

    options {
    default-key „rndc-key“;
    default-server 192.168.1.1;
    default-port 953;
    };
    # End of rndc.conf

    # Use with the following in named.conf, adjusting the allow list as needed:
    # key „rndc-key“ {
    #       algorithm hmac-md5;
    #       secret „xWJwYI6DpBCA72B3FxqzBA==“;
    # };
    #
    # controls {
    #       inet 192.168.1.1 port 953
    #               allow { 192.168.1.1; } keys { „rndc-key“; };
    # };

    # End of named.conf[/code]

    Den „secrect“ Key bitte auch im File named.conf beachten !!

    Neue DNS Einträge werden in den Files domain.local.mas und LAN.rev eingetragen.

    In diesem Beispiel wurde die Domain „domain.local“ verwendet.

    Bei Fragen am besten im Forum posten.

    Christian

     

     

    Schreibe einen Kommentar

    Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert