Date: Tue, 16 Aug 2005 13:20:36 -0700 From: garys@opusnet.com (Gary W. Swearingen) To: Chuck Swiger <cswiger@mac.com> Cc: questions@freebsd.org Subject: Re: cache-only named won't resolve "localhost" Message-ID: <y5iry5ws4r.ry5@mail.opusnet.com> In-Reply-To: <43014635.4060301@mac.com> (Chuck Swiger's message of "Mon, 15 Aug 2005 21:49:41 -0400") References: <4w1x4wyqkl.x4w@mail.opusnet.com> <43000B38.8040002@daleco.biz> <mnwtmnxlrz.tmn@mail.opusnet.com> <43014635.4060301@mac.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Chuck Swiger <cswiger@mac.com> writes:
> Note that the resolver will treat lookups of "localhost." and "localhost" differently if you have a domain or search
> directive specified in /etc/resolv.conf. You could and perhaps should ensure that the one ending in a period exists in
> a zone file on the nameserver, and maps via an A record to 127.0.0.1:
Apparently so. I've sorta followed your suggestions and used the
following rather verbose master/localhost with good results (except
Mozilla). You needn't read further; I've just added some observations.
$TTL 604800
localhost. IN SOA localhost. root.localhost. (
20050816 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Minimum
;Name Server:
localhost. IN NS localhost.
;Host Address:
localhost. IN A 127.0.0.1
;Host Alias:
localhost.localhost. IN CNAME localhost.
; The End.
Now "host", "dig", and "nslookup" work OK, even without an
/etc/resolv.conf file. But sendmail seems to need the later.
(It just has "nameserver 127.0.0.1".)
I tried to make "localhost.localhost" the canonical domain and
"localhost." the alias (so it would better correspond to the
reverse mapping which has 127.0.0.1 > localhost.localhost.), but
it then wouldn't resolve "localhost" OR "localhost.localhost".
My DNS book implies taht any domain name can be assigned to a host, as
it can with the CNAME above, but it seems that important software
either insists that a host has a two-part domain name or chokes on a
FQDN like "localhost.", which ends with a dot. So be it.
Mozilla apparently doesn't even use my local DNS as it still hangs.
(I must admit that I've never checked my caching DNS's cache.)
I know little about proxies, but I tried configuring Mozilla to use a
"localhost" proxyand it then resolved "localhost" OK, but my funky
python-only web server couldn't find the index.html it found with
127.0.0.1. Oh well, I don't much care about Mozilla problems as long
as I can work around it, which I can.
Thanks.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?y5iry5ws4r.ry5>
