From owner-freebsd-questions@FreeBSD.ORG Tue Apr 5 15:36:36 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 C9B0416A4CE for ; Tue, 5 Apr 2005 15:36:36 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7487343D31 for ; Tue, 5 Apr 2005 15:36:36 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j35FaZMh085065; Tue, 5 Apr 2005 10:36:35 -0500 (CDT) (envelope-from dan) Date: Tue, 5 Apr 2005 10:36:35 -0500 From: Dan Nelson To: Martin Petraschek Message-ID: <20050405153635.GC64927@dan.emsphone.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 5.4-PRERELEASE X-message-flag: Outlook Error User-Agent: Mutt/1.5.8i cc: "freebsd-questions@freebsd.org" Subject: Re: Viewing DNS cache entries X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Apr 2005 15:36:36 -0000 In the last episode (Apr 05), Martin Petraschek said: > The operating system is caching DNS name resolutions in order to > avoid repeated DNS requests for the same hostname. Is it possible to > display the entries of that DNS cache? > > Under Windows, the command "ipconfig /displaydns" exists, and I would > need that functionality under FreeBSD. You can use the "rndc dump" command, which will create a file that contains all of the currently-cached DNS entries. If you are running a chrooted named (default in 5.*), add this line to /etc/namedb/named.conf in the options{} section: dump-file "/var/dump/named_dump.db"; , then run "rndc reconfig" and "rndc dump". The dumpfile will end up in /var/named/var/dump/named_dump.db. -- Dan Nelson dnelson@allantgroup.com