From owner-freebsd-questions Sun Jan 14 16:29:21 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail2.wi.rr.com (fe2.rdc-kc.rr.com [24.94.163.49]) by hub.freebsd.org (Postfix) with ESMTP id 6462C37B401 for ; Sun, 14 Jan 2001 16:29:04 -0800 (PST) Received: from woodstock.monkey.net ([24.167.246.123]) by mail2.wi.rr.com with Microsoft SMTPSVC(5.5.1877.357.35); Sun, 14 Jan 2001 18:26:43 -0600 Received: from pobox.com (localhost [127.0.0.1]) by woodstock.monkey.net (Postfix) with ESMTP id 87D6C177; Sun, 14 Jan 2001 18:28:47 -0600 (CST) X-Mailer: exmh version 2.1.1 10/16/1999 To: Steve Price Cc: Dennis Jun , freebsd-questions@FreeBSD.ORG, chat@gtabug.org Subject: Re: DNS caching, DHCP, /etc/resolv.conf In-reply-to: Your message of "Sun, 14 Jan 2001 17:53:37 CST." <20010114175337.E65118@bonsai.knology.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 14 Jan 2001 18:28:47 -0600 From: Jon Hamilton Message-Id: <20010115002847.87D6C177@woodstock.monkey.net> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <20010114175337.E65118@bonsai.knology.net>, Steve Price wrote: } On Sun, Jan 14, 2001 at 06:41:22PM -0500, Dennis Jun wrote: } # Hello all! } # } # I recently setup a DNS caching server with named. I followed the } # instructions in Lehey's "The Complete FreeBSD." However I'm on @home and I } # my ip settings via dhcp. Thus it resets my /etc/resolv.conf all the time, } # that is, it removes my first line of nameserver 127.0.0.1 I'm wondering } # how can prevert/remedy this? I guess most people would suggest a simple } # script cronned, but is there another solution? } } The following manpage should have all the info you need. Essentially } you'll have to teach this script to add 127.0.0.1 back to resolv.conf } when your box renegotiates its IP address. } } man 8 dhclient-script That's doing it the hard way. Put something similar to the following in /etc/dhclient.conf (adjust the interface name to whatever is appropriate for your system): interface "dc0" { prepend domain-name-servers 127.0.0.1; } You can prepend some stuff to the domain name search order (and lots of other stuff, if you need to); see the man page for dhclient.conf for details. -- Jon Hamilton hamilton@pobox.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message