From owner-freebsd-questions@FreeBSD.ORG Tue Aug 16 20:19:56 2005 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0111716A420 for ; Tue, 16 Aug 2005 20:19:56 +0000 (GMT) (envelope-from garys@opusnet.com) Received: from opusnet.com (mail.opusnet.com [209.210.200.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8AE1E43D48 for ; Tue, 16 Aug 2005 20:19:55 +0000 (GMT) (envelope-from garys@opusnet.com) Received: from localhost.localhost [70.98.246.232] by opusnet.com with ESMTP (SMTPD32-8.05) id AA67D8110128; Tue, 16 Aug 2005 13:19:51 -0700 Received: from localhost.localhost (localhost.localhost [127.0.0.1]) by localhost.localhost (8.13.3/8.13.3) with ESMTP id j7GKKgOq052844; Tue, 16 Aug 2005 13:20:42 -0700 (PDT) (envelope-from garys@opusnet.com) Received: (from jojo@localhost) by localhost.localhost (8.13.3/8.13.3/Submit) id j7GKKawd052843; Tue, 16 Aug 2005 13:20:36 -0700 (PDT) (envelope-from garys@opusnet.com) To: Chuck Swiger References: <4w1x4wyqkl.x4w@mail.opusnet.com> <43000B38.8040002@daleco.biz> <43014635.4060301@mac.com> From: garys@opusnet.com (Gary W. Swearingen) Date: Tue, 16 Aug 2005 13:20:36 -0700 In-Reply-To: <43014635.4060301@mac.com> (Chuck Swiger's message of "Mon, 15 Aug 2005 21:49:41 -0400") Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.17 (Jumbo Shrimp, berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: questions@freebsd.org Subject: Re: cache-only named won't resolve "localhost" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Aug 2005 20:19:56 -0000 Chuck Swiger 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.