DNS服务器多个域反向

时间:2019-04-09 13:14:06

标签: server superuser

我在debian jessy中设置了dns服务器,我配置了域,但无法正常工作。 我的配置文件是

名为named.conf.local的文件

include "/etc/bind/named.conf.log";
//uno
//directa

zone "uno.com.ar" IN {
    type master;
    file "/etc/bind/uno.com.ar";
    allow-query { any; };
};

//reversa
zone "100.43.200.in-addr.arpa" {
    type master;
    file "/etc/bind/uno.com.ar.reversa";
};


zone "dos.com.ar" IN {
    type master;
    file "/etc/bind/dos.com.ar";
    allow-query { any; };
};

FIle uno.com.ar

 ;
    ; BIND data file for local loopback interface
    ;
    $TTL    604800
    @       IN      SOA     dns.uno.com.ar. root.uno.com.ar. (
                     2017030101         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
    ;
    @       IN      NS      uno.com.ar.
    @       IN      MX   10  mail.uno.com.ar.
    @       IN      A       XXX.XX.100.5
    @        IN TXT   "v=spf1 a mx ~all"

    dns  IN      A       XXX.XX.100.2
    www     IN      A       XXX.XX.100.5
    mail    IN      A       XXX.XX.100.6
    ;dns IN      CNAME   www

FILE dos.com.ar

 ; BIND data file for local loopback interface
    ;
    $TTL    604800
    @       IN      SOA     dos.com.ar. root.dos.com.ar. (
                     2017022004         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
    ;
    @       IN      NS      dos.com.ar.
    @       IN      MX   20  mail
    @       IN      A       XXX.XX.100.5

    www     IN      A       XXX.XX.100.5
    mail    IN      A       XXX.XX.100.6
    dns  IN      CNAME   www

文件uno.com.ar.reversa

 $TTL    604800
    @       IN      SOA   dns.uno.com.ar. root.uno.com.ar. (
                       2017022301         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
    ;

    ; Name servers
        IN      NS      dns.uno.com.ar.

    ; PTR records
    2       IN      PTR      dns.uno.com.ar.
    5       IN      PTR      web.uno.com.ar.

    6       IN      PTR      mail.uno.com.ar.

测试

NSLOOKUP

 > uno.com.ar
    Server:         XXX.XX.100.2
    Address:        XXX.XX.100.2#53

    Name:   uno.com.ar
    Address: XXX.XX.100.5
    > XXX.XX.100.5
    Server:         XXX.XX.100.2
    Address:        XXX.XX.100.2#53

    5.100.43.200.in-addr.arpa       name = web.uno.com.ar.
    > dos.com.ar
    Server:         XXX.XX.100.2
    Address:        XXX.XX.100.2#53

    Name:   dos.com.ar
    Address: XXX.XX.100.5
    > server 8.8.8.8
    Default server: 8.8.8.8
    Address: 8.8.8.8#53
    > uno.com.ar
    Server:         8.8.8.8
    Address:        8.8.8.8#53

    Non-authoritative answer:
    Name:   uno.com.ar
    Address: XXX.XX.100.5
    > dos.com.ar
    Server:         8.8.8.8
    Address:        8.8.8.8#53

    ** server can't find dos.com.ar: NXDOMAIN
    >

DIG

挖掘uno.com.ar

  ; <<>> DiG 9.9.5-9+deb8u9-Debian <<>> uno.com.ar
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62239
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4096
    ;; QUESTION SECTION:
    ;uno.com.ar.               IN      A

    ;; ANSWER SECTION:
    uno.com.ar.        604800  IN      A       XXX.XX.100.5

    ;; AUTHORITY SECTION:
    uno.com.ar.        604800  IN      NS      uno.com.ar.

    ;; Query time: 0 msec
    ;; SERVER: XXX.XX.100.2#53(XXX.XX.100.2)
    ;; WHEN: Tue Apr 09 10:09:11 ART 2019
    ;; MSG SIZE  rcvd: 74

root @ dns:/ etc / bind#挖XXX.XX.100.5

 ; <<>> DiG 9.9.5-9+deb8u9-Debian <<>> XXX.XX.100.5
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 156
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4096
    ;; QUESTION SECTION:
    ;XXX.XX.100.5.                  IN      A

    ;; AUTHORITY SECTION:
    .                       10800   IN      SOA     a.root-servers.net. 
    nstld.verisign-grs.com. 2019040900 1800 900 604800 86400

    ;; Query time: 51 msec
    ;; SERVER: XXX.XX.100.2#53(XXX.XX.100.2)
    ;; WHEN: Tue Apr 09 10:09:21 ART 2019
    ;; MSG SIZE  rcvd: 116

root @ dns:/ etc / bind#dig dos.com.ar

  ; <<>> DiG 9.9.5-9+deb8u9-Debian <<>> dos.com.ar
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34160
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4096
    ;; QUESTION SECTION:
    ;dos.com.ar.          IN      A

    ;; ANSWER SECTION:
    dos.com.ar.   604800  IN      A       XXX.XX.100.5

    ;; AUTHORITY SECTION:
    dos.com.ar.   604800  IN      NS      dos.com.ar.

    ;; Query time: 0 msec
    ;; SERVER: XXX.XX.100.2#53(XXX.XX.100.2)
    ;; WHEN: Tue Apr 09 10:09:37 ART 2019
    ;; MSG SIZE  rcvd: 79

dos.com.ar没有响应,我在做什么错? 有人能帮我吗? 最好的问候

0 个答案:

没有答案