Nameserver, der die avahi-Multicast-Namensauflösung der .local-Domäne beeinträchtigt

1685
Doug Coburn

Nach dem Versuch, eine Maschine in meinem lokalen Netzwerk anzupingen, bemerkte ich, dass ich die Adresse 66.152.109.24 versuchte. Dies ist eine externe öffentliche Adresse. Die Auflösung sollte über avahi mDNS erfolgen. Ich suchte nach Informationen über die Namensauflösung und mein Quest / Centurylink-Nameserver führte Ergebnisse für meine .local-Domain-Abfragen zurück. Ich habe einen zufälligen Namen ausprobiert und das gleiche IP-Adressergebnis erhalten.

 $ 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 

Fehlt mir etwas oder ist mein DNS-Namenserver bei 205.171.3.25 beschädigt?

1

1 Antwort auf die Frage

2
grawity

(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.)