Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

After trying to ping a machine on my local network, I noticed that I was trying hit address 66.152.109.24. This is an external public address. Resolution should have occurred via avahi mDNS. I ran dig to see how the name resolution worked and my quest/centurylink name server was retuning results for my .local domain queries! I tried a random name and got the same ip address result.

 $ dig jakdafj.local

 ; <<>> DiG 9.8.1-P1-RedHat-9.8.1-3.P1.fc15 <<>> jakdafj.local
 ;; global options: +cmd
 ;; Got answer:
 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58410
 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

 ;; QUESTION SECTION:
 ;jakdafj.local.            IN  A

 ;; ANSWER SECTION:
 jakdafj.local.     10  IN  A   66.152.109.24
 jakdafj.local.     10  IN  A   204.232.231.46

 ;; Query time: 104 msec
 ;; SERVER: 205.171.3.25#53(205.171.3.25)
 ;; WHEN: Sat Mar 24 20:40:17 2012
 ;; MSG SIZE  rcvd: 63

Am I missing something or is my DNS name server at 205.171.3.25 corrupted?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

(For clarity, I used "uDNS" in this post when referring to the server-based unicast DNS.)

Three problems can be noted:

  1. dig is a DNS diagnostic program. It uses uDNS and only uDNS, completely ignoring the name resolution settings configured in nsswitch.conf, hence is the wrong tool to use when debugging Avahi mDNS.

    Use getent ahosts instead, which uses the same getaddrinfo() routine as normal programs.

  2. If uDNS takes priority when you try to resolve an existing mDNS name, it might mean your nsswitch.conf is incorrectly configured (although it would be rare on Fedora). You should have mDNS – at least one of mdns or mdns_minimalbefore dns in the "hosts" line; for example:

    hosts: files mdns_minimal [NOTFOUND=return] dns mdns myhostname
    
  3. The uDNS server you are using, 205.171.3.25 aka resolver.qwest.net, performs "catch-all" redirection. In other words, if you try to look up a nonexistent name, instead of a NXDOMAIN you will receive the address for Qwest's advertising-filled "Website suggestions" page. (You can see this by opening any of the returned IP addresses in your browser.)

    Qwest employ this questionable practice claiming to "improve customer experience", and you can opt out. (Or switch to another DNS server, such as Google Public DNS.)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.