Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

/etc/hosts files usually have this line, ::1 localhost. I thought ::1 was the equivalent of, and from my reading it seems to be the IPv6 version. So I was using it in Apache for firewalling, "Allow from ::1" and it only allowed local. Then suddenly that stopped working, so I pinged ::1 and got a remote IP address. I tracerouted it and it went through my ISP, through some Microsoft server, then another half dozen steps of asterisks... I'm not sure why this would be (the remote IP), but it doesn't seem good. I grep'd my hard drive for the remote IP and it doesn't appear anywhere. Is this some indicator that I'm being hacked, or normal behavior? Maybe my IPv6 settings are wrong? (This is a brand new MacBookPro with Snow Leopard.) Any ideas about this would be great - what is ::1 supposed to be, why would it be remote, should I be worried, how do I get it back to localhost? Thank you!

share|improve this question

migrated from May 6 '10 at 6:04

This question came from our site for professional and enthusiast programmers.

Suspect this would be better asked in – Preet Sangha May 6 '10 at 2:14
What is the remote IP it is pointed to? – PK May 6 '10 at 2:22

The problem is probably that ping doesn't handle IPv6, it's a tool from the good old IPv4 days. Since it doesn't recognize ::1 as a valid IPv4 address, it'll try to resolve it like a domain. For some reason, the DNS server you're using responds with a valid IPv4 address for this "domain".

To ping the IPv6 address, use ping6 ::1, which should yield answers from your localhost.
To trace where the DNS answer is coming from, try running dig ::1 +trace.

share|improve this answer
+1 for informative and concice answer. – Robert May 6 '10 at 21:26
My bet is that if he replaced '::1' with 'dognostril', he'd get the same result. Likely a domain in his search path has a wildcard entry. – David Schwartz Sep 7 '11 at 17:45

Your Answer


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