A question about Localhost with Safari

Brandon Allbery allbery.b at gmail.com
Sun Jan 4 07:46:53 PST 2015


On Sun, Jan 4, 2015 at 10:34 AM, René J.V. <rjvbertin at gmail.com> wrote:

> On Sunday January 04 2015 09:05:42 Brandon Allbery wrote:
>
> >From the standpoint of DNS, "localhost" is fully qualified: it is not the
> >short form of a name that is meaningful only in the context of a
> particular
> >domain.
>
> AFAIK you need an entry in /etc/hosts in order for "localhost" to be
> defined, no?
>

BIND9 at least comes with a local zone definition that includes
"localhost." as a name, with the usual mapping. That said, people *usually*
get it from /etc/hosts... *but* OS X is a little weird in how/when it uses
the hosts file.

>It sounds like the problem is that Apple has moved to making IPv6 the
> >default, even when only local IPv6 connectivity (ie. zeroconf/Bonjour)
> >exists. I would expect this to have other knock-on effects, for example it
> >will try to connect to IPv6 addresses returned by external DNS even though
> >it cannot. Beyond that, it sounds like IPv6 loopback may not be being
> >configured if only link-local addresses are configured; this seems like an
> >Apple bug to me.
>
> Hmmm, I did notice, already under 10.6.8, that zeroconf address resolution
> yielded IPv6 addresses for my Mac that cause issues (from a Linux host)
> when I'm connected to my TimeCapsule's WiFi network, which is configured to
> bridge the main router/modem's local network. Not sure if that's related,
> but it does help making me think of IPv6 as something that's not quite
> ready for wide-spread use without IT staff ...
>

It'll be fine once commodity Internet and commodity routers/access points
(aside from Apple's!) includes IPv6 connectivity. Currently, you'll find
that getting IPv6 upstream is nearly impossible in many places / with many
providers; most commodity routers don't handle IPv6, or require extra
configuration to do so, even if you have it (or are only using
link-local!); and this means you cannot configure IPv6 properly and many
things can (not necessarily will) fail in weird ways.

In this particular case, either Apple is not associating ::1 with the
loopback adapter in link-local IPv6 mode or Apache is not configuring IPv6
(and therefore not listening on ::1) if it doesn't find a full IPv6
configuration; I can't say which. In the one you describe, I'm betting that
something does not understand IPv6, so when Linux tries to use avahi (its
version of zeroconf) to connect it fails. (Sadly, Bonjour includes IPv6
addresses in the zeroconf broadcast over IPv4, so other machines will
indeed attempt to make IPv6 connections even when they're only receiving
IPv4 zeroconf. I've seen this failure mode myself, and it is one reason my
stuff is now on a separate network with local IPv6.)

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-users/attachments/20150104/e0b0ef24/attachment.html>


More information about the macports-users mailing list