From owner-freebsd-questions Wed Nov 14 17:37:17 2001 Delivered-To: freebsd-questions@freebsd.org Received: from hawk.prod.itd.earthlink.net (hawk.mail.pas.earthlink.net [207.217.120.22]) by hub.freebsd.org (Postfix) with ESMTP id 3EF7C37B418 for ; Wed, 14 Nov 2001 17:37:13 -0800 (PST) Received: from dialup-209.245.143.107.dial1.sanjose1.level3.net ([209.245.143.107] helo=blossom.cjclark.org) by hawk.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 164BSq-0000IV-00; Wed, 14 Nov 2001 17:37:12 -0800 Received: (from cjc@localhost) by blossom.cjclark.org (8.11.6/8.11.3) id fAF1al227489; Wed, 14 Nov 2001 17:36:47 -0800 (PST) (envelope-from cjc) Date: Wed, 14 Nov 2001 17:36:47 -0800 From: "Crist J. Clark" To: The Anarcat Cc: FreeBSD Questions Subject: Re: can't do reverse dns with /etc/hosts Message-ID: <20011114173647.D66694@blossom.cjclark.org> Reply-To: cjclark@alum.mit.edu References: <20011115012039.GA61093@shall.anarcat.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011115012039.GA61093@shall.anarcat.dyndns.org>; from anarcat@anarcat.dyndns.org on Wed, Nov 14, 2001 at 08:20:39PM -0500 X-URL: http://people.freebsd.org/~cjc/ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Nov 14, 2001 at 08:20:39PM -0500, The Anarcat wrote: > Hi! > > I stumbled upon a slight problem recently. I always figured using a > nameserver was a good idea for my local network so I had one setup for > quite a while.. However, my router doesn't talk to the nameserver for > security reasons. (the nameserver takes care of the *local* DNS setup.) > > Now, I figured that if I put a few entries in /etc/hosts on that router, > it won't really need to consult the DNS anyways. The entries are in > place, but it doesn't work. On a test machine, I discover that bypassing > the nameserver to do reverse queries simply breaks them. Example, with > the nameserver in resolv.conf: > > anarcat@shall[~]% host 10.0.0.1 > 1.0.0.10.IN-ADDR.ARPA domain name pointer foo.anarcat.dyndns.org host(1) _always_ uses DNS. > All nice and easy. Now, I enter a proper line (?) in /etc/hosts to > replace that: > > 10.0.0.1 foo.anarcat.dyndns.org foo > > I *remove* resolv.conf (since turning "bind" off in /etc/host.conf doesn't > seem to be enough!) and I get: > > anarcat@shall[~]% host 10.0.0.1 > Host not found, try again. > anarcat@shall[~]% > host(1) always uses DNS. > At first I tought /etc/hosts didn't allow reverse lookups, but after a > bit of reading in /usr/src (lib/libc/net/gethostbyht.c is an interesting > reading :), I realise that it *did* allow reverse lookups... I am now > confused. Is my setup correct? What do I do wrong? host(1) always uses DNS. -- Crist J. Clark | cjclark@alum.mit.edu | cjclark@jhu.edu http://people.freebsd.org/~cjc/ | cjc@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message