From owner-freebsd-questions Tue Nov 30 15:27: 9 1999 Delivered-To: freebsd-questions@freebsd.org Received: from mailarray.mpx.com.au (local2.mpx.com.au [203.29.192.98]) by hub.freebsd.org (Postfix) with ESMTP id A1F5814E5F for ; Tue, 30 Nov 1999 15:27:05 -0800 (PST) (envelope-from wincent@dingoblue.net.au) Received: from [198.142.240.124](really [198.142.240.124]) by mailarray.mpx.com.au via smtpd with esmtp id for ; Wed, 1 Dec 1999 10:27:00 +1100 (/\##/\ Smail3.1.30.13.Y2K #30.35 built 1-mar-01) User-Agent: Microsoft Outlook Express Macintosh Edition - 5.0 (1513) Date: Wed, 01 Dec 1999 09:56:42 +1030 Subject: Local DNS on LAN Gateway with Multiple PPP Dialup Accounts From: wincent To: Message-ID: In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Having thoroughly demonstrated my newbie-ness by posting to the wrong address, I am now resending this email... hopefully I got it right this time! Hi All This is my first post to the list so please forgive me if my question has already been answered... First of all a bit of background: I've set up a FreeBSD box as a gateway machine for my home network. I've followed the FAQs and docs so that I can dialup to my ISP with the FreeBSD box and then the other machines on the home network can access the net through the gateway, using NAT. It seems to work. I have also set up a local DNS on the FreeBSD box. I have it set up to do two things: (1) Answer name queries about addresses *within* the home network (2) Serve as a caching name server for queries *outside* of the home network I do this by using the "forwarders" option in my named.conf file. I simply specify the IP addresses of the nameservers at my ISP. The idea is, if the gateway nameserver doesn't know the name, it just asks the ISP DNS. Next time I ask the gateway nameserver, it *does* know the name because it holds it cached. This seems to work too. Note: I've set the DNS to ignore queries etc from machines outside of the home network. So at last we come to my question. The tricky part is that I have *two* ISPs. I sometimes use one, sometimes the other. Depending on which one I use, the IPs in my "forwarders" option in my named.conf need to be different. The question is, what is the best way to switch between these configurations? So far, the best idea I've been able to come up with is to have two named.conf files under different names (say "alternate" and "default"). When I want to switch to the other configuration I would just type: ndc stop named -b /etc/namedb/named.conf.alternate & To go back to the other: ndc named -b /etc/namedb/named.conf.default & I have no idea whether there is a better way to do this, or if what I am doing is Not A Good Thing (TM). The bad thing about the above method is that I think the name daemon loses its cache every time it is stopped. Is that right? Any way to avoid it? Anyway to change the forwarders options without restarting named? I'm running FreeBSD 3.3-RELEASE with the BIND 8 distribution that came on the install CD. Thanks a lot for your help Cheers Wincent To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message