Date: Tue, 1 Aug 2006 13:41:43 +0100 (BST) From: "Mark Powell" <M.S.Powell@salford.ac.uk> To: freebsd-questions@freebsd.org Subject: Using dnscache locally with FBSD 6.x Message-ID: <20060801133245.B9668@rust.salford.ac.uk>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060801133245.B9668>