bind9 não está respondendo às solicitações de DNS

1

Estou tentando configurar um servidor DNS básico que apenas encaminha solicitações de outros servidores DNS.

Instalei o bind9 e editei o arquivo /etc/bind/named.conf.options como abaixo.

options {
    directory "/var/cache/bind";

    // If there is a firewall between you and nameservers you want
    // to talk to, you may need to fix the firewall to allow multiple
    // ports to talk.  See http://www.kb.cert.org/vuls/id/800113

    // 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 {
        8.8.8.8;
    };

    //========================================================================
    // If BIND logs error messages about the root key being expired,
    // you will need to update your keys.  See https://www.isc.org/bind-keys
    //========================================================================
    dnssec-validation auto;

    auth-nxdomain no;    # conform to RFC1035
    listen-on-v6 { any; };
};

Por isso, deve encaminhar solicitações para o servidor DNS do Google (trivial, mas pretendo adicionar mais em uma data posterior).

Em seguida, editei /etc/network/interfaces para adicionar o servidor DNS como um loopback (127.0.0.1) para teste. Depois, executei sudo service bind9 start e sudo ifdown ens33 && sudo ifup ens33 para exibir tudo.

Mas isso não parece ter funcionado. Eu executei um dig google.com e ele não está resolvendo o próprio pedido (127.0.0.1).

; <<>> DiG 9.10.3-P4-Ubuntu <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63300
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;google.com.            IN  A

;; ANSWER SECTION:
google.com.     276 IN  A   216.58.220.110

;; Query time: 0 msec
;; SERVER: 192.168.0.3#53(192.168.0.3)
;; WHEN: Sun Feb 26 16:43:05 PST 2017
;; MSG SIZE  rcvd: 55

Eu também tentei conectar-me ao servidor DNS externamente através de uma máquina com Windows 7, mas parece não resolver nada, uma consulta nslookup da máquina com Windows 7 fornece os seguintes resultados.

nslookup google.com
Server:  UnKnown
Address:  192.168.0.188

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

Eu executei um sudo service bind9 status , o que me diz que o serviço está ativo, mas parece que tem alguns problemas de resolução.

â— bind9.service - BIND Domain Name Server
   Loaded: loaded (/lib/systemd/system/bind9.service; enabled; vendor preset: enabled)
  Drop-In: /run/systemd/generator/bind9.service.d
           └─50-insserv.conf-$named.conf
   Active: active (running) since Sun 2017-02-26 16:26:44 PST; 20min ago
     Docs: man:named(8)
  Process: 1329 ExecStop=/usr/sbin/rndc stop (code=exited, status=0/SUCCESS)
 Main PID: 1334 (named)
    Tasks: 7 (limit: 512)
   CGroup: /system.slice/bind9.service
           └─1334 /usr/sbin/named -f -u bind

Feb 26 16:39:24 ubuntu named[1334]: network unreachable resolving '151.in-addr.arpa/DNSKEY/IN': 2001:500:2f::f#53
Feb 26 16:39:24 ubuntu named[1334]: REFUSED unexpected RCODE resolving '151.in-addr.arpa/DNSKEY/IN': 202.12.27.33#53
Feb 26 16:39:24 ubuntu named[1334]: network unreachable resolving '151.in-addr.arpa/DNSKEY/IN': 2001:dc3::35#53
Feb 26 16:39:24 ubuntu named[1334]: REFUSED unexpected RCODE resolving '151.in-addr.arpa/DNSKEY/IN': 192.112.36.4#53
Feb 26 16:39:24 ubuntu named[1334]: REFUSED unexpected RCODE resolving '151.in-addr.arpa/DNSKEY/IN': 192.228.79.201#53
Feb 26 16:39:24 ubuntu named[1334]: network unreachable resolving '151.in-addr.arpa/DNSKEY/IN': 2001:500:84::b#53
Feb 26 16:39:24 ubuntu named[1334]: network unreachable resolving '151.in-addr.arpa/DNSKEY/IN': 2001:500:12::d0d#53
Feb 26 16:39:24 ubuntu named[1334]: REFUSED unexpected RCODE resolving '151.in-addr.arpa/DNSKEY/IN': 198.97.190.53#53
Feb 26 16:39:24 ubuntu named[1334]: network unreachable resolving '151.in-addr.arpa/DNSKEY/IN': 2001:500:1::53#53
Feb 26 16:39:24 ubuntu named[1334]: broken trust chain resolving '69.65.101.151.in-addr.arpa/PTR/IN': 8.8.8.8#53

Alguém consegue identificar o que eu fiz de errado ou me dar dicas sobre o que devo verificar em seguida?

    
por Puddler 27.02.2017 / 01:49

0 respostas