Date: Wed, 14 Nov 2001 17:36:47 -0800 From: "Crist J. Clark" <cristjc@earthlink.net> To: The Anarcat <anarcat@anarcat.dyndns.org> Cc: FreeBSD Questions <freebsd-questions@FreeBSD.ORG> Subject: Re: can't do reverse dns with /etc/hosts Message-ID: <20011114173647.D66694@blossom.cjclark.org> In-Reply-To: <20011115012039.GA61093@shall.anarcat.dyndns.org>; from anarcat@anarcat.dyndns.org on Wed, Nov 14, 2001 at 08:20:39PM -0500 References: <20011115012039.GA61093@shall.anarcat.dyndns.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011114173647.D66694>