From owner-freebsd-questions@FreeBSD.ORG Sun May 15 11:06:09 2005 Return-Path: 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 371DA16A4CE for ; Sun, 15 May 2005 11:06:09 +0000 (GMT) Received: from mail.nativenerds.com (host-70-0-111-24.midco.net [24.111.0.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id B002443D6E for ; Sun, 15 May 2005 11:06:08 +0000 (GMT) (envelope-from estover@nativenerds.com) Received: from [192.168.1.89] (host-133-35-230-24.midco.net [24.230.35.133]) j4FBJsKT009907; Sun, 15 May 2005 05:19:54 -0600 (MDT) (envelope-from estover@nativenerds.com) Message-ID: <42872D71.3050902@nativenerds.com> Date: Sun, 15 May 2005 05:07:29 -0600 From: Ed Stover Organization: Native Nerds User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050503) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Xian References: <200505121205.17487.ian@codepad.net> In-Reply-To: <200505121205.17487.ian@codepad.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on mail.nativenerds.com cc: freebsd-questions@freebsd.org Subject: Re: Slow DNS X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: estover@nativenerds.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 May 2005 11:06:09 -0000 Xian wrote: > I have just set up a router and would like DNS caching on it. I have tried to > set it up an it kind of works, just computer using it as their nameserver > take ages on DNS queries, up to 4-5 seconds. > > To set up the DNS caching I added the ip of another DNS server > to /etc/resolv.conf and added namd_enable="YES" to /etc/rc.conf. > I also tweaked the following lines in /var/named/etc/namedb/named.conf: > listen-on { "any"; }; > forwarders { > 192.168.0.1; > }; > query-source address * port 53; > > Any ideas on how to make it run better? The DNS server at 192.168.0.1 answers > DNS queries in a few milliseconds. > Put an entry for your upstream DNS/DNSes as well... That will speed things up. <--quote // In addition to the "forwarders" clause, you can force your name // server to never initiate queries of its own, but always ask its // forwarders only, by enabling the following line: // // forward only; // If you've got a DNS server around at your upstream provider, enter // its IP address here, and enable the line below. This will make you // benefit from its cache, thus reduce overall DNS traffic in the Internet. /* forwarders { 127.0.0.1; }; */ -->