From owner-freebsd-questions@FreeBSD.ORG Tue Aug 1 12:41:58 2006 Return-Path: X-Original-To: freebsd-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 B0E8B16A4DD for ; Tue, 1 Aug 2006 12:41:58 +0000 (UTC) (envelope-from M.S.Powell@salford.ac.uk) Received: from iapetus.salford.ac.uk (iapetus.salford.ac.uk [146.87.255.98]) by mx1.FreeBSD.org (Postfix) with SMTP id B7F0343D5A for ; Tue, 1 Aug 2006 12:41:46 +0000 (GMT) (envelope-from M.S.Powell@salford.ac.uk) Received: (qmail 69993 invoked by uid 98); 1 Aug 2006 12:41:45 -0000 Received: from 146.87.255.121 by iapetus.salford.ac.uk (envelope-from , uid 401) with qmail-scanner-1.25 (clamdscan: 0.88/1629. uvscan: v4.4.00/v4818. spamassassin: 3.0.4. Clear:RC:1(146.87.255.121):. Processed in 0.779462 secs); 01 Aug 2006 12:41:45 -0000 Received: from rust.salford.ac.uk (HELO newplato.salford.ac.uk) (146.87.255.121) by iapetus.salford.ac.uk (qpsmtpd/0.29-cvs-20040817) with SMTP; Tue, 01 Aug 2006 13:41:44 +0100 Received: (qmail 10007 invoked by uid 1002); 1 Aug 2006 12:41:43 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 1 Aug 2006 12:41:43 -0000 Date: Tue, 1 Aug 2006 13:41:43 +0100 (BST) From: "Mark Powell" To: freebsd-questions@freebsd.org Message-ID: <20060801133245.B9668@rust.salford.ac.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Using dnscache locally with FBSD 6.x 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, 01 Aug 2006 12:41:58 -0000 Hi, I want to put a local DJB dnscache on each host. This is primarily to improve reliabilty during network glitches. They will have cached most of our local addresses and will not hang if one of their dns servers disappears. However, I use svscan to start up dnscache, and that starts very late in the boot. That means I can't just have the single "nameserver 127.0.0.1" line in resolv.conf, as every lookup would timeout until dnscache started. That means I need to replace resolv.conf early in the boot with the addresses of remote dns caches: ----- nameserver x.x.x.x nameserver y.y.y.y ----- and then in dnscache's svscan startup file I can then put it back to: ----- nameserver 127.0.0.1 ----- I'm having difficulty finding the best place to make the former resolv.conf change to the remote dns servers. I initially tried /etc/rc.conf.local, but that gets sourced 16 times during bootup. That effectively forces resolv.conf to the remote dns servers, as it ust also be sourced after the dnscache has started up and overwrites the "nameserver 127.0.0.1" change that it makes when it starts up. Anyone got a better place to put this? Cheers. -- Mark Powell - UNIX System Administrator - The University of Salford Information Services Division, Clifford Whitworth Building, Salford University, Manchester, M5 4WT, UK. Tel: +44 161 295 4837 Fax: +44 161 295 5888 www.pgp.com for PGP key