Estou hospedando alguns sites em casa, por exemplo, example.com e sub.example.com, e, embora meus registros DNS estejam definidos corretamente (um registro, por exemplo.com, que aponta para o endereço IP do meu roteador e CNAME para (*) com o valor 'example.com.'), meu roteador parece não conseguir resolver o subdomínio. Aqui está a saída de alguns exercícios, com meus nomes reais de domínio e subdomínio substituídos por example.com e sub.example.com.
~ $ drill example.com @8.8.8.8
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 55521
;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;; example.com. IN A
;; ANSWER SECTION:
example.com. 899 IN A 109.133.244.17
;; AUTHORITY SECTION:
;; ADDITIONAL SECTION:
;; Query time: 70 msec
;; SERVER: 8.8.8.8
;; WHEN: Fri Oct 13 10:06:23 2017
;; MSG SIZE rcvd: 41
~ $ drill sub.example.com @8.8.8.8 <<<
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 33949
;; flags: qr rd ra ; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;; sub.example.com. IN A
;; ANSWER SECTION:
sub.example.com. 1799 IN CNAME example.com.
example.com. 899 IN A 109.133.244.17
;; AUTHORITY SECTION:
;; ADDITIONAL SECTION:
;; Query time: 105 msec
;; SERVER: 8.8.8.8
;; WHEN: Fri Oct 13 10:06:33 2017
;; MSG SIZE rcvd: 62
~ $ drill example.com @192.168.1.1
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 59107
;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;; example.com. IN A
;; ANSWER SECTION:
example.com. 781 IN A 109.133.244.17
;; AUTHORITY SECTION:
;; ADDITIONAL SECTION:
;; Query time: 26 msec
;; SERVER: 192.168.1.1
;; WHEN: Fri Oct 13 10:06:43 2017
;; MSG SIZE rcvd: 41
~ $ drill -V 10000 sub.example.com @192.168.1.1
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 0
;; flags: rd ; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;; sub.example.com. IN A
;; ANSWER SECTION:
;; AUTHORITY SECTION:
;; ADDITIONAL SECTION:
;; Query time: 0 msec
;; WHEN: Fri Oct 13 10:17:39 2017
;; MSG SIZE rcvd: 0
Error: error sending query: Could not send or receive, because of network error
Para completar, aqui estão os registros DNS associados ao domínio:
@ 900 IN A 109.133.244.17
@ 10800 IN SOA ns1.gandi.net. hostmaster.gandi.net. 1507886704 10800 3600 604800 10800
sub 10800 IN CNAME example.com.
imap 10800 IN CNAME access.mail.gandi.net.
pop 10800 IN CNAME access.mail.gandi.net.
smtp 10800 IN CNAME relay.mail.gandi.net.
webmail 10800 IN CNAME webmail.gandi.net.
Alguém saberia o que pode estar causando esse comportamento curioso?
Obrigado.