2

When

1) pinging xbcd.com I get 127.0.0.1

2) using a web browser and the URL xbcd.com leads me to the local webserver, if it exists.

I've tried this on Ubuntu 14.04, multiple networks/DNS, as well as on Android CM11 on multiple WiFi/DNS networks and T-Mobile network; each of those resolve with the localhost. Both OSX and Windows appear to complain no route to host.

How/Why is this happening? I found no documentation or material on the matter. I'm curious if this is some reserved URL and Linux (Ubuntu at least I've seen)/Android have acknowledged the URL and in the OS intentionally point back to the localhost.

Anyone have any idea? Are others seeing this or have noticed this ever?

UPDATE, required info from comment...

dig xbcd.com results:

; <<>> DiG 9.9.5-3-Ubuntu <<>> xbcd.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39824 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

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

;; ANSWER SECTION: xbcd.com. 1972 IN A 0.0.0.0

;; Query time: 35 msec ;; SERVER: 127.0.1.1#53(127.0.1.1) ;; WHEN: Tue Sep 23 11:39:24 PDT 2014 ;; MSG SIZE rcvd: 53

getent hosts xbcd.com results:

0.0.0.0 xbcd.com

1
  • what do you see if you lookup the name using dig? What do you see if you use getent? Update your question with details.
    – Zoredache
    Sep 23, 2014 at 18:39

2 Answers 2

4

The owner could have pointed it to 127.0.0.1 I get 0.0.0.0 when I check it.

4
  • Really, I didn't know that was possible/allowed? Interesting. Sep 23, 2014 at 18:46
  • Correct, wow: who.is/whois/xbcd.com shows that too. You learn something new everyday. Thanks Sep 23, 2014 at 18:47
  • 5
    For that matter, there's nothing to stop you from returning a NS record with private IP space (127.0.0.1, 10.0.0.1, etc.) and tricking a recursive nameserver into passing queries along. BIND does not make any assumption about what IP spaces are bogus for authoritative lookups, and it must be specifically instructed to discard these NS records via the server directive.
    – Andrew B
    Sep 23, 2014 at 20:11
  • @AndrewB thanks for the additional information on how NameServers work. Sep 23, 2014 at 20:36
2

The domain resolves to the any address 0.0.0.0, which means the address of any interface on the host on which you are running.

Thus it is not very surprising that when you try to ping it, you get 127.0.0.1. You would get the same if you ping 0.0.0.0 directly without going through the domain name.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .