I
I
Igor Maksimov2016-02-14 18:27:06
Domain Name System
Igor Maksimov, 2016-02-14 18:27:06

NS server does not give information about the domain?

Hello. The problem is this: when polling your NS server

; <<>> DiG 9.9.5 <<>> @ns1.example.com example.com ANY
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached

I ask Google, Google knows this host.
; <<>> DiG 9.9.5 <<>> @8.8.8.8 example.com ANY
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50739
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;example.com. IN ANY

;; ANSWER SECTION:
example.com. 3599 IN SOA ns1.example.com. admin.example.com. 2016021301 3600 900 3600000 3600
example.com. 3599 IN NS ns.secondary.net.ua.
example.com. 3599 IN NS ns1.example.com.
example.com. 3599 IN NS ns2.example.com.
example.com. 3599 IN MX 10 mx.example.com.
example.com. 3599 IN A 91.203.26.168

;; Query time: 159 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sun Feb 14 12:59:05 MSK 2016
;; MSG SIZE rcvd: 187

named.conf config
acl "xfer" { 193.201.116.2; };
acl "trusted" { 127.0.0.0/8; 192.168.0.0/28; };

//------------------------ Раздел опций ---------------------------//
options {
  directory "/var/bind";
  pid-file "/run/named/named.pid";

  //bindkeys-file "/etc/bind/bind.keys";

  listen-on-v6 { none; };
  listen-on { 127.0.0.1; 192.168.0.1; 91.203.26.168; };

  //allow-query { any; };
  //allow-query-cache { trusted; };
  //allow-recursion { trusted; };
  //allow-transfer { xfer; };
  //allow-update { none; };

  forward first;
  forwarders {
        176.120.119.66; // ISP
  //	4.2.2.1;		// Level3 Public DNS
  //	4.2.2.2;		// Level3 Public DNS
    8.8.8.8;		// Google Open DNS
    8.8.4.4;		// Google Open DNS
  };

    //dnssec-enable yes;
  //dnssec-validation yes;
  //dnssec-validation auto;
  query-source address * port 53;
};


//----------------------- Политика логов --------------------------//
// настройки логирования
logging {
          channel "misc" {
                    file "/var/log/named/misc.log" versions 4 size 4m;
                    print-time yes;
                    print-severity yes;
                    print-category yes;
          };

          channel "query" {
                    file "/var/log/named/query.log" versions 4 size 4m;
                    print-time yes;
                    print-severity no;
                    print-category no;
          };

          category default {
                    "misc";
          };

          category queries {
                    "query";
          };
};


include "/etc/bind/rndc.key";
controls {
  inet 127.0.0.1 port 953 allow { 127.0.0.1/32; } keys { "rndc-key"; };
};

//-------------------------- Zones ----------------------------//

zone "." in {
        type hint;
        file "/var/bind/named.cache";
};

zone "localhost" IN {
        type master;
        file "pri/localhost.zone";
        notify no;
};

zone "example.com" {
        type master;
        file "pri/example-com.zone";
        notify yes;
        allow-transfer { xfer; };
};

zone file
Zone;time to live before cache refresh is 1 hour by default.
$TTL 3600
;запись SOA - начальная запись зоны
@               IN      SOA     ns1.example.com. admin.example.com.  (
                                2016021301      ; Серийный номер формат YYYYMMDDNN
                                3600            ; Обновление
                                900             ; Повтор
                                3600000         ; Истечение срока
                                3600 )          ; Минимальное TTL
;серверы DNS
@               IN      NS      ns1.example.com.
@               IN      NS      ns2.example.com.
@               IN      NS      ns.secondary.net.ua.

;записи MX
@               MX      10      mx.example.com.

;сопоставление имя - ip
@               IN      A       91.203.26.168
ns1             IN      A       91.203.26.168
ns2             IN      A       91.203.26.168
test            IN      A       91.203.26.168

tcpdump exhaust
srv0 main # tcpdump -i eth0 -n -nn -ttt 'host 91.203.26.168 and port 53'
dropped privs to tcpdump
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
00:00:00.000000 IP 74.125.183.77.62478 > 91.203.26.168.53: 37652 [1au] A? ns1.example.com. (58)
00:00:00.000676 IP 91.203.26.168 > 74.125.183.77.62478: 37652*- 1/3/2 A 91.203.26.168 (142)
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
00:00:00.000000 IP 74.125.183.77.62478 > 91.203.26.168: 37652 [1au] A? ns1.example.com. (58)
00:00:00.000676 IP 91.203.26.168 > 74.125.183.77.62478: 37652*- 1/3/2 A 91.203.26.168 (142)

From the query log (polled dig from another host)
14-Feb-2016 13:37:55.558 client 74.125.183.77#62478 (ns1.example.com): view external: query: ns1.example.com IN A -ED (91.203.26.168)

I wrote on the lore, but everything somehow died out there. I hope some help here.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question