Why can't I reach a specific host using a specific DNS?

forvas asked:

I’m trying to send some info to www2.agenciatributaria.gob.es. I can do it from several hosts but one.

From this one I get the error Temporary failure in name resolution. However, from the same host I can reach many other servers though its default DNS (I can ping www.google.es, etc).

So I used dig to check what happens. If I execute dig www2.agenciatributaria.gob.es, the IP of the remote host is searched by the DNS on 127.0.0.53, and the results are wrong (nevertheless, results are successful if I dig on www.google.es):

; <<>> DiG 9.16.1-Ubuntu <<>> www2.agenciatributaria.gob.es
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 58113
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;www2.agenciatributaria.gob.es. IN      A

;; Query time: 7 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Mon Sep 27 09:17:00 UTC 2021
;; MSG SIZE  rcvd: 58

On the other hand, If I execute dig +norecurse @8.8.8.8 www2.agenciatributaria.gob.es, to search the IP of the remote host with the DNS on 8.8.8.8, the results are successful:

; <<>> DiG 9.16.1-Ubuntu <<>> +norecurse @8.8.8.8 www2.agenciatributaria.gob.es
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31565
;; flags: qr ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;www2.agenciatributaria.gob.es. IN      A

;; ANSWER SECTION:
www2.agenciatributaria.gob.es. 201 IN   A       195.77.198.18

;; Query time: 0 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Mon Sep 27 09:16:28 UTC 2021
;; MSG SIZE  rcvd: 74

I’m not an expert on this subject. But I guess there is some problem with the DNS for only that domain. Can anyone help me here? How can I solve this problem or what should I check now?

resolvectl status

Global
       LLMNR setting: no                  
MulticastDNS setting: no                  
  DNSOverTLS setting: no                  
      DNSSEC setting: no                  
    DNSSEC supported: no                  
          DNSSEC NTA: 10.in-addr.arpa     
                      16.172.in-addr.arpa 
                      168.192.in-addr.arpa
                      17.172.in-addr.arpa 
                      18.172.in-addr.arpa 
                      19.172.in-addr.arpa 
                      20.172.in-addr.arpa 
                      21.172.in-addr.arpa 
                      22.172.in-addr.arpa 
                      23.172.in-addr.arpa 
                      24.172.in-addr.arpa 
                      25.172.in-addr.arpa 
                      26.172.in-addr.arpa 
                      27.172.in-addr.arpa 
                      28.172.in-addr.arpa 
                      29.172.in-addr.arpa 
                      30.172.in-addr.arpa 
                      31.172.in-addr.arpa 
                      corp                
                      d.f.ip6.arpa        
                      home                
                      internal            
                      intranet            
                      lan                 
                      local               
                      private             
                      test                

Link 2 (ens3)
      Current Scopes: DNS           
DefaultRoute setting: yes           
       LLMNR setting: yes           
MulticastDNS setting: no            
  DNSOverTLS setting: no            
      DNSSEC setting: no            
    DNSSEC supported: no            
  Current DNS Server: 213.186.33.99 
         DNS Servers: 213.186.33.99 
          DNS Domain: openstacklocal

My answer:


Your local resolver is configured to forward DNS queries to 213.186.33.99, DNS server that OVH provides to its customers. Querying this server directly reveals that it is the failing server.

$ host www2.agenciatributaria.gob.es 213.186.33.99
Using domain server:
Name: 213.186.33.99
Address: 213.186.33.99#53
Aliases: 

Host www2.agenciatributaria.gob.es not found: 2(SERVFAIL)

Edit your /etc/resolv.conf to provide a more reliable set of nameservers and then try again.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.