przeniesienie serwerów dns na nowy komputer

Konfiguracja serwerów, usług, itp.
waltharius
Posty: 2
Rejestracja: 24 czerwca 2008, 19:13

przeniesienie serwerów dns na nowy komputer

Post autor: waltharius »

Witam,

Mam dziwny problem, z którym od dłuższego czasu nie idzie mi się uporać. Przeszukałem sporo stron w sieci jednak nadal nie umiem znaleźć odpowiedzi na pytanie dlaczego nie działa mi to tak jak powinno.

Oto mój problem:

Mam dwa serwery dns - master i slave. Z pewnych względów musiałem przenieść slave ze starej maszyny na nową w innej lokalizacji i na inną wersję nameda. Przeniosłem pliki stref i zrobiłem (wydawałoby się) poprawny konfig binda. Jednak wygląda na to, że po prawie tygodniu od przeniesienia slava (dns2.apartmentsapart.com) niektóre serwery załapały nowy IP, a niektóre nadal wskazują na stary. Stary serwer cały czas działa, ponieważ po jego wyłączeniu secondary dns w ogóle przestaje istnieć.

Konfigi:

konfig na starym serwerze slave, który działał bez zarzutu:

Kod: Zaznacz cały

key "key" {
        algorithm       hmac-md5;
        secret
"YT1bM9OaIEBYfAIqmQbKlNWr1TZ3MJaHriqvMhGtxf8jtYXnhAdYDhtfDdxf";
};


controls {
    inet 127.0.0.1 allow { any; } keys { "key"; };
};

logging {
// ignore all "lame server" errors (only do this if none of the lame
// servers belong to you; otherwise, fix them)
category lame-servers{ null; };
};


options {
        pid-file "/var/run/named/named.pid";
        directory "/var/named";
        version "noversion";
#       recursion no;
#       allow-recursion { 127.0.0.1; 192.168.5.0/24; };
        /*
         * If there is a firewall between you and nameservers you want
         * to talk to, you might need to uncomment the query-source
         * directive below.  Previous versions of BIND always asked
         * questions using port 53, but BIND 8.1 uses an unprivileged
         * port by default.
         */
        query-source address * port 53;
        allow-query {127.0.0.1; 192.168.5.0/24; sporo różnych potrzebnych IP; };
};

//
// a caching only nameserver config
//
zone "." {
        type hint;
        file "named.ca";
};

zone "0.0.127.in-addr.arpa" {
        type master;
        file "named.local";
};

zone "5.168.192.in-addr.arpa" {

        type slave;
        file "internal.apartmentsapart.com.zone.rev";
        masters { IP.Mastera; };
        allow-query { 127.0.0.1; 192.168.5.0/24; Inne.IP/29; };
};
Konfig nowego slava:

Kod: Zaznacz cały

logging {
        channel xfer-log {
                file "named.log";
                print-category yes;
                print-severity yes;
                print-time yes;
                severity info;
        };
        category xfer-in { xfer-log; };
        category xfer-out { xfer-log; };
        category notify { xfer-log; };
        category queries { xfer-log; };
};

include "/etc/bind/named.conf.options";

// reduce log verbosity on issues outside our control
#logging {
#       category lame-servers { null; };
#       category cname { null; };
#};

// prime the server with knowledge of the root servers
zone "." {
        type hint;
        file "/etc/bind/db.root";
};
named.conf.options - includowany:

Kod: Zaznacz cały

options {
        directory "/var/named";

        // from bind 9:
        //      [fetch-glue] is obsolete. In BIND 8, fetch-glue yes caused the
        //      server to attempt to fetch glue resource records it didn't have
        //      when constructing the additional data section of a response.
        //      This is now considered a bad idea and BIND 9 never does it.

        fetch-glue no;

        // If there is a firewall between you and nameservers you want
        // to talk to, you might need to uncomment the query-source
        // directive below.  Previous versions of BIND always asked
        // questions using port 53, but BIND 8.1 and later use an unprivileged
        // port by default.

        // query-source address * port 53;

        // If your ISP provided one or more IP addresses for stable
        // nameservers, you probably want to use them as forwarders.
        // Uncomment the following block, and insert the addresses replacing
        // the all-0's placeholder.

        // forwarders {
        //      0.0.0.0;
        //

        allow-query { any; };
        allow-recursion { 127.0.0.1; 192.168.1.0/24; };

        forwarders {
            62.111.170.250;
            213.134.128.19;
            213.134.128.20;
        };

        };
};
Dodatkowo, przy restarcie binda dostaję taki błąd w logach:

Kod: Zaznacz cały

Jun 24 19:05:50 elf named[793]: starting (/etc/bind/named.conf).  named 8.4.7-REL-NOESW Mon Sep 25 00:30:06 UTC 2006 ^Ilamont@mix:/build/lamont/bind-8.4.7/src/bin/named
Jun 24 19:05:50 elf named[793]: In '/etc/bind/named.conf.options' line 39
Jun 24 19:05:50 elf named[793]: included from '/etc/bind/named.conf' line 22
Jun 24 19:05:50 elf named[793]: /etc/bind/named.conf.options:39: syntax error near '}'
Ale w linii 39 owego pliku nie ma nic wczytywanego. Ilość nawiasów wydaje się w porządku, ich rozmieszczenie także, chyba, że coś przegapiłem.

Lokalnie mogę bez problemu pobierać dane o strefach z slave, niektóre zewnętrzne serwery też pokazują prawidłowe dane, natomiast jest sporo takich, które tego nie robię poprawnie.

Na przykład tutaj można sprawdzić, że są jakieś niezgodności: http://www.intodns.com/apartmentsapart.com

DNS działa bo mam poprawny adres IP dla dns2:

Kod: Zaznacz cały

C:\Windows\system32>nslookup.exe dns2.apartmentsapart.com elf.warsaw-hotels.co.u
k
DNS request timed out.
    timeout was 2 seconds.
Server:  UnKnown
Address:  89.171.124.162  - to jest poprawny adres.

DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
*** Request to UnKnown timed-out
Czy może to być problem z firewallem?

Sam nie wiem za co się tutaj jeszcze złapać. Będę wdzięczny za każdą poradę.

Pozdrawiam

MR
sappa
Beginner
Posty: 148
Rejestracja: 08 sierpnia 2006, 15:09

Post autor: sappa »

Jak dla mnie to w named.conf.options ostatnie }; jest zbedny.
ODPOWIEDZ