From owner-freebsd-isp@FreeBSD.ORG Sun Jul 8 19:33:07 2007 Return-Path: X-Original-To: freebsd-isp@freebsd.org Delivered-To: freebsd-isp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A21516A400 for ; Sun, 8 Jul 2007 19:33:07 +0000 (UTC) (envelope-from patrick_dkt@yahoo.com.hk) Received: from web54303.mail.re2.yahoo.com (web54303.mail.re2.yahoo.com [206.190.49.113]) by mx1.freebsd.org (Postfix) with SMTP id ED8A413C458 for ; Sun, 8 Jul 2007 19:33:06 +0000 (UTC) (envelope-from patrick_dkt@yahoo.com.hk) Received: (qmail 39050 invoked by uid 60001); 8 Jul 2007 19:06:26 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.hk; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=2Y/jfjNZLbXcCabHSqfKiq2xtTv54uWkJU9Rbe+vViFWRhZSawT98liF7y9fUKgCxNU5fdX1vRSOGHDySJ0KfXOv5aepdRgLtvP57C2DlLREu0moE5L4fd70ViiGaXzXJwh4xiqO+hkuJggvs6erVCAaK8Q/vefZ4U52ORNcdzc=; X-YMail-OSG: m9am0HwVM1luGz5dC9sB0B17hXYDqWxJc6xOTeB2e5tyvXzZTpygsO4rbJFiPv1Z1x1KOlqtfi.4R_rHANmL3K67vtsWrI._cGXdGD4jusB9bld9Jl.iKfAtAflSqiULSWdPDuUG8jTZ_NwBoDv8lA01ErH2NwXFdReVNvLdy1s- Received: from [61.15.61.52] by web54303.mail.re2.yahoo.com via HTTP; Sun, 08 Jul 2007 12:06:26 PDT Date: Sun, 8 Jul 2007 12:06:26 -0700 (PDT) From: Patrick Dung To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <410648.39042.qm@web54303.mail.re2.yahoo.com> Cc: freebsd-isp@freebsd.org Subject: FreeBSD 6.2 default bind9, question about customize logging [re-post] X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2007 19:33:07 -0000 I am using FreeBSD 6.2 with the default bind (not ports). By default chroot is used. When named start or stop, it does have log in /var/log/messages. But for example, when some do domain transfer successfully, that is not logged (zone transfer denied is logged). So I tried to add this part in named.conf (enabled local0.* in syslog.conf) , but still no luck. Any suggestions? logging { channel named-log { //syslog daemon; syslog local0; severity info; print-category yes; }; category default { named-log; }; category xfer-in { named-log; }; category xfer-out { named-log; }; category unmatched { null; }; }; Thanks Patrick ____________________________________________________________________________________ Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=list&sid=396545433 From owner-freebsd-isp@FreeBSD.ORG Tue Jul 10 18:18:25 2007 Return-Path: X-Original-To: freebsd-isp@freebsd.org Delivered-To: freebsd-isp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A1EE116A46F for ; Tue, 10 Jul 2007 18:18:25 +0000 (UTC) (envelope-from duane@dwlabs.ca) Received: from smtpout.eastlink.ca (smtpout.eastlink.ca [24.222.0.30]) by mx1.freebsd.org (Postfix) with ESMTP id 64A0413C4B9 for ; Tue, 10 Jul 2007 18:18:25 +0000 (UTC) (envelope-from duane@dwlabs.ca) Received: from ip01.eastlink.ca ([24.222.10.5]) by mta02.eastlink.ca (Sun Java System Messaging Server 6.2-4.03 (built Sep 22 2005)) with ESMTP id <0JKZ00DF65GOS2C0@mta02.eastlink.ca> for freebsd-isp@freebsd.org; Tue, 10 Jul 2007 14:48:24 -0300 (ADT) Received: from blk-224-199-230.eastlink.ca (HELO dwpc.dwlabs.ca) ([24.224.199.230]) by ip01.eastlink.ca with ESMTP; Tue, 10 Jul 2007 14:47:37 -0300 Received: from dwpc.dwlabs.ca (ftp.dwlabs.ca [192.168.0.10]) by dwpc.dwlabs.ca (8.14.1/8.13.8) with ESMTP id l6AHjml4018605; Tue, 10 Jul 2007 14:45:54 -0300 (ADT envelope-from duane@dwpc.dwlabs.ca) Received: (from duane@localhost) by dwpc.dwlabs.ca (8.14.1/8.13.8/Submit) id l6AHjm9u018604; Tue, 10 Jul 2007 14:45:48 -0300 (ADT envelope-from duane) Date: Tue, 10 Jul 2007 14:45:48 -0300 From: Duane Whitty In-reply-to: <410648.39042.qm@web54303.mail.re2.yahoo.com> To: Patrick Dung Message-id: <20070710174548.GE1810@dwpc.dwlabs.ca> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CALZik0YY4Mfm/2dsb2JhbAA X-IronPort-AV: E=Sophos;i="4.16,523,1175482800"; d="scan'208";a="250677010" X-Virus-Scanned: ClamAV 0.90.2/3623/Tue Jul 10 13:02:25 2007 on dwpc.dwlabs.ca X-Virus-Status: Clean X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on dwpc.dwlabs.ca References: <410648.39042.qm@web54303.mail.re2.yahoo.com> User-Agent: Mutt/1.4.2.2i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,BAYES_00, DK_POLICY_SIGNSOME autolearn=failed version=3.1.8 Cc: freebsd-isp@freebsd.org Subject: Re: FreeBSD 6.2 default bind9, question about customize logging [re-post] X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-isp@freebsd.org List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2007 18:18:25 -0000 On Sunday, 8 July 2007 at 12:06:26 -0700, Patrick Dung wrote: > I am using FreeBSD 6.2 with the default bind (not ports). > By default chroot is used. > > When named start or stop, it does have log in /var/log/messages. > But for example, when some do domain transfer successfully, that is not > logged (zone transfer denied is logged). > > So I tried to add this part in named.conf (enabled local0.* in > syslog.conf) , but still no luck. Any suggestions? > > logging { > channel named-log { > //syslog daemon; > syslog local0; > severity info; > print-category yes; > }; > category default { named-log; }; > category xfer-in { named-log; }; > category xfer-out { named-log; }; > category unmatched { null; }; > }; > > Thanks > Patrick > Hi Patrick, I have not configured this in named.conf but I have accomplished the same task using rndc(8). I used rndc trace level. Sorry but I can't remember what trace level I used for the zone xfer to be logged. Best Regards, Duane From owner-freebsd-isp@FreeBSD.ORG Wed Jul 11 02:04:30 2007 Return-Path: X-Original-To: freebsd-isp@freebsd.org Delivered-To: freebsd-isp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4629A16A46C; Wed, 11 Jul 2007 02:04:30 +0000 (UTC) (envelope-from evs@telod.net) Received: from kohav.telod.net (h-72-245-221-62.chcgilgm.covad.net [72.245.221.62]) by mx1.freebsd.org (Postfix) with ESMTP id E39D913C455; Wed, 11 Jul 2007 02:04:29 +0000 (UTC) (envelope-from evs@telod.net) Received: from [192.168.0.2] (wall.hm.telod.net [72.245.221.58]) (authenticated bits=0) by kohav.telod.net (8.13.8/8.13.3) with ESMTP id l6B1oIO2014928; Tue, 10 Jul 2007 20:50:19 -0500 (CDT) (envelope-from evs@telod.net) In-Reply-To: <410648.39042.qm@web54303.mail.re2.yahoo.com> References: <410648.39042.qm@web54303.mail.re2.yahoo.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Edward Shabotinsky Date: Tue, 10 Jul 2007 20:50:32 -0500 To: Patrick Dung X-Mailer: Apple Mail (2.752.3) Cc: freebsd-isp@freebsd.org, freebsd-questions@freebsd.org Subject: Re: FreeBSD 6.2 default bind9, question about customize logging [re-post] X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2007 02:04:30 -0000 this is what i have from 5.2 logging { channel namedlog { file "/var/log/named.log"; severity info; print-category yes; print-severity yes; print-time yes; }; category lame-servers { null; }; category default { namedlog; }; category xfer-out { namedlog;}; }; hope this help On Jul 8, 2007, at 2:06 PM, Patrick Dung wrote: > I am using FreeBSD 6.2 with the default bind (not ports). > By default chroot is used. > > When named start or stop, it does have log in /var/log/messages. > But for example, when some do domain transfer successfully, that is > not > logged (zone transfer denied is logged). > > So I tried to add this part in named.conf (enabled local0.* in > syslog.conf) , but still no luck. Any suggestions? > > logging { > channel named-log { > //syslog daemon; > syslog local0; > severity info; > print-category yes; > }; > category default { named-log; }; > category xfer-in { named-log; }; > category xfer-out { named-log; }; > category unmatched { null; }; > }; > > Thanks > Patrick > > > > ______________________________________________________________________ > ______________ > Be a better Heartthrob. Get better relationship answers from > someone who knows. Yahoo! Answers - Check it out. > http://answers.yahoo.com/dir/?link=list&sid=396545433 > _______________________________________________ > freebsd-isp@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-isp > To unsubscribe, send any mail to "freebsd-isp-unsubscribe@freebsd.org" From owner-freebsd-isp@FreeBSD.ORG Wed Jul 11 07:04:30 2007 Return-Path: X-Original-To: freebsd-isp@freebsd.org Delivered-To: freebsd-isp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9088C16A400 for ; Wed, 11 Jul 2007 07:04:30 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with SMTP id 499D313C46A for ; Wed, 11 Jul 2007 07:04:30 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 4592 invoked by uid 399); 11 Jul 2007 06:37:47 -0000 Received: from localhost (HELO ?192.168.0.6?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 11 Jul 2007 06:37:47 -0000 X-Originating-IP: 127.0.0.1 Message-ID: <46947AB8.809@FreeBSD.org> Date: Tue, 10 Jul 2007 23:37:44 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: freebsd-isp@freebsd.org References: <410648.39042.qm@web54303.mail.re2.yahoo.com> <20070710174548.GE1810@dwpc.dwlabs.ca> In-Reply-To: <20070710174548.GE1810@dwpc.dwlabs.ca> X-Enigmail-Version: 0.95.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Patrick Dung Subject: Re: FreeBSD 6.2 default bind9, question about customize logging [re-post] X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2007 07:04:30 -0000 > On Sunday, 8 July 2007 at 12:06:26 -0700, Patrick Dung wrote: >> I am using FreeBSD 6.2 with the default bind (not ports). >> By default chroot is used. It's not a major issue, but it's probably worth pointing out that whatever code base you use (base or ports) the behavior such as chroot, logging, etc. is controlled by the combination of /etc/rc.d/named and your named.conf options. Therefore this discussion applies equally well either way. >> When named start or stop, it does have log in /var/log/messages. >> But for example, when some do domain transfer successfully, that is not >> logged (zone transfer denied is logged). I have intentionally avoided adding more complex logging to the default named.conf because it's very hard to decide which way to land on this to make the most people happy (and/or the least people mad). I am of course always open to suggestions. :) >> So I tried to add this part in named.conf (enabled local0.* in >> syslog.conf) , but still no luck. Any suggestions? The obvious ones, did you HUP the daemon after you changed the conf, and did you pre-create any new files that syslogd is supposed to write to for the local0 facility? Can you share your syslog.conf line for this? Do you get any joy when you try 'logger -plocal0.info blah' ? >> logging { >> channel named-log { While I don't see that it's explicitly forbidden to use a - in a channel name, every example I've ever seen or used myself uses an underscore instead (named_log). >> //syslog daemon; >> syslog local0; >> severity info; >> print-category yes; >> }; >> category default { named-log; }; >> category xfer-in { named-log; }; >> category xfer-out { named-log; }; >> category unmatched { null; }; >> }; This all looks good (modulo the - issue I mentioned above), and I use something similar myself, so once you're sure you can write to the syslog facility, you should be able to get this to work. I should probably also point out that unless you really need this to go to syslog, you're probably better off writing to a file channel instead (less overhead, especially on a busy server). Either way there is information in the ARM that will help you, /usr/share/doc/bind9/arm. hth, Doug -- This .signature sanitized for your protection From owner-freebsd-isp@FreeBSD.ORG Wed Jul 11 13:14:52 2007 Return-Path: X-Original-To: freebsd-isp@freebsd.org Delivered-To: freebsd-isp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8328A16A400 for ; Wed, 11 Jul 2007 13:14:52 +0000 (UTC) (envelope-from patrick_dkt@yahoo.com.hk) Received: from web54305.mail.re2.yahoo.com (web54305.mail.re2.yahoo.com [206.190.49.115]) by mx1.freebsd.org (Postfix) with SMTP id 477C913C4C4 for ; Wed, 11 Jul 2007 13:14:52 +0000 (UTC) (envelope-from patrick_dkt@yahoo.com.hk) Received: (qmail 71873 invoked by uid 60001); 11 Jul 2007 13:14:48 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.hk; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=i4N6vvlN5fIrQisP4MQz8IL91Hljv1l5R0/HWJfJixf/xUHL86VoENc46YdoDRQ/RyI9MK1mLxywO/kDKhpYH1BXD3OHSoXWrB0KMvoUf9mUkdHbxVJpZdNuRZS7TrN0UzuhnPULpnRF6PyL36a0Tt+dgWHjFO9kHZH8VRHteYo=; X-YMail-OSG: xKHeDLUVM1kvaWEwSaKUHSU7p9H8IMMX.z4JrTeRbeULmZwNglMKhoKH7l4EtIgyn5Z.RUvINyrUezOtflhjMFMeNCdnGS4qnxrf3tutg987mTw- Received: from [61.15.61.52] by web54305.mail.re2.yahoo.com via HTTP; Wed, 11 Jul 2007 06:14:47 PDT Date: Wed, 11 Jul 2007 06:14:47 -0700 (PDT) From: Patrick Dung To: Doug Barton , freebsd-isp@freebsd.org, freebsd-questions@freebsd.org In-Reply-To: <46947AB8.809@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <989377.60550.qm@web54305.mail.re2.yahoo.com> Cc: Patrick Dung Subject: Re: FreeBSD 6.2 default bind9, question about customize logging [re-post] (solved) X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2007 13:14:52 -0000 --- Doug Barton wrote: > > On Sunday, 8 July 2007 at 12:06:26 -0700, Patrick Dung wrote: > >> I am using FreeBSD 6.2 with the default bind (not ports). > >> By default chroot is used. > > It's not a major issue, but it's probably worth pointing out that > whatever code base you use (base or ports) the behavior such as > chroot, logging, etc. is controlled by the combination of > /etc/rc.d/named and your named.conf options. Therefore this > discussion > applies equally well either way. I use FreeBSD 6.2 with the named come with the base. /etc/rc.conf named_enable="YES" # Run named, the DNS server (or NO). named_program="/usr/sbin/named" # path to named, if you want a different one. #named_flags="" # Flags for named named_pidfile="/var/run/named/pid" # Must set this in named.conf as well named_uid="bind" # User to run named as named_chrootdir="/var/named" # Chroot directory (or "" not to auto-chroot it) named_chroot_autoupdate="YES" # Automatically install/update chrooted # components of named. See /etc/rc.d/named. named_symlink_enable="YES" # Symlink the chrooted pid file > > >> When named start or stop, it does have log in /var/log/messages. > >> But for example, when some do domain transfer successfully, that > is not > >> logged (zone transfer denied is logged). > > I have intentionally avoided adding more complex logging to the > default named.conf because it's very hard to decide which way to land > on this to make the most people happy (and/or the least people mad). > I > am of course always open to suggestions. :) I need to log successful domain transfer for debugging purpose (which slave/client has done domain transfer at what time). > > >> So I tried to add this part in named.conf (enabled local0.* in > >> syslog.conf) , but still no luck. Any suggestions? > > The obvious ones, did you HUP the daemon after you changed the conf, > and did you pre-create any new files that syslogd is supposed to > write > to for the local0 facility? Can you share your syslog.conf line for > this? Do you get any joy when you try 'logger -plocal0.info blah' ? > > >> logging { > >> channel named-log { > > While I don't see that it's explicitly forbidden to use a - in a > channel name, every example I've ever seen or used myself uses an > underscore instead (named_log). > > >> //syslog daemon; > >> syslog local0; > >> severity info; > >> print-category yes; > >> }; > >> category default { named-log; }; > >> category xfer-in { named-log; }; > >> category xfer-out { named-log; }; > >> category unmatched { null; }; > >> }; > > This all looks good (modulo the - issue I mentioned above), and I use > something similar myself, so once you're sure you can write to the > syslog facility, you should be able to get this to work. > > I should probably also point out that unless you really need this to > go to syslog, you're probably better off writing to a file channel > instead (less overhead, especially on a busy server). Either way > there > is information in the ARM that will help you, > /usr/share/doc/bind9/arm. > After furher testing, I got my problem solved. 1. I found named-log is ok to use. 2. I did not need to change my previous named.conf. 3. The problem is in /etc/syslog.conf With the default /etc/syslog.conf, I have add a line: local0.* /var/log/messages There is a difference on where I put it, if I put it at the bottom of the file, even `logger -p local0.info test` will not work. If it put that line on the top-most of syslog.conf, everything is working fine... BTW, could anyone explain why putting local0.* /var/log/messages at the bottom of syslog.conf will not work? Regards Patrick > > hth, > > Doug > > -- > > This .signature sanitized for your protection > ____________________________________________________________________________________ Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. http://farechase.yahoo.com/ From owner-freebsd-isp@FreeBSD.ORG Thu Jul 12 01:26:33 2007 Return-Path: X-Original-To: freebsd-isp@freebsd.org Delivered-To: freebsd-isp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1B66A16A41F; Thu, 12 Jul 2007 01:26:33 +0000 (UTC) (envelope-from evs@telod.net) Received: from kohav.telod.net (h-72-245-221-62.chcgilgm.covad.net [72.245.221.62]) by mx1.freebsd.org (Postfix) with ESMTP id C717513C46A; Thu, 12 Jul 2007 01:26:32 +0000 (UTC) (envelope-from evs@telod.net) Received: from [192.168.0.2] (wall.hm.telod.net [72.245.221.58]) (authenticated bits=0) by kohav.telod.net (8.13.8/8.13.3) with ESMTP id l6C1QKp9024157; Wed, 11 Jul 2007 20:26:21 -0500 (CDT) (envelope-from evs@telod.net) In-Reply-To: <989377.60550.qm@web54305.mail.re2.yahoo.com> References: <989377.60550.qm@web54305.mail.re2.yahoo.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Edward Shabotinsky Date: Wed, 11 Jul 2007 20:26:25 -0500 To: Patrick Dung X-Mailer: Apple Mail (2.752.3) Cc: freebsd-isp@freebsd.org, Doug Barton , freebsd-questions@freebsd.org Subject: Re: FreeBSD 6.2 default bind9, question about customize logging [re-post] (solved) X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2007 01:26:33 -0000 hi, i am not sure why local0 would not work at the bottom of the file may be some sort of rules - first come, first serv but, sorry i forgot to mention of the my syslog.conf file along with named.conf file !named *.* /var/log/bind/named.log this is what i got, but i don't like to log named instances into /var/ log/messages On Jul 11, 2007, at 8:14 AM, Patrick Dung wrote: > > --- Doug Barton wrote: > >>> On Sunday, 8 July 2007 at 12:06:26 -0700, Patrick Dung wrote: >>>> I am using FreeBSD 6.2 with the default bind (not ports). >>>> By default chroot is used. >> >> It's not a major issue, but it's probably worth pointing out that >> whatever code base you use (base or ports) the behavior such as >> chroot, logging, etc. is controlled by the combination of >> /etc/rc.d/named and your named.conf options. Therefore this >> discussion >> applies equally well either way. > > I use FreeBSD 6.2 with the named come with the base. > > /etc/rc.conf > named_enable="YES" # Run named, the DNS server (or NO). > named_program="/usr/sbin/named" # path to named, if you want a > different one. > #named_flags="" # Flags for named > named_pidfile="/var/run/named/pid" # Must set this in named.conf as > well > named_uid="bind" # User to run named as > named_chrootdir="/var/named" # Chroot directory (or "" not to > auto-chroot it) > named_chroot_autoupdate="YES" # Automatically install/update > chrooted > # components of named. See > /etc/rc.d/named. > named_symlink_enable="YES" # Symlink the chrooted pid file > >> >>>> When named start or stop, it does have log in /var/log/messages. >>>> But for example, when some do domain transfer successfully, that >> is not >>>> logged (zone transfer denied is logged). >> >> I have intentionally avoided adding more complex logging to the >> default named.conf because it's very hard to decide which way to land >> on this to make the most people happy (and/or the least people mad). >> I >> am of course always open to suggestions. :) > > I need to log successful domain transfer for debugging purpose (which > slave/client has done domain transfer at what time). > >> >>>> So I tried to add this part in named.conf (enabled local0.* in >>>> syslog.conf) , but still no luck. Any suggestions? >> >> The obvious ones, did you HUP the daemon after you changed the conf, >> and did you pre-create any new files that syslogd is supposed to >> write >> to for the local0 facility? Can you share your syslog.conf line for >> this? Do you get any joy when you try 'logger -plocal0.info blah' ? >> >>>> logging { >>>> channel named-log { >> >> While I don't see that it's explicitly forbidden to use a - in a >> channel name, every example I've ever seen or used myself uses an >> underscore instead (named_log). >> >>>> //syslog daemon; >>>> syslog local0; >>>> severity info; >>>> print-category yes; >>>> }; >>>> category default { named-log; }; >>>> category xfer-in { named-log; }; >>>> category xfer-out { named-log; }; >>>> category unmatched { null; }; >>>> }; >> >> This all looks good (modulo the - issue I mentioned above), and I use >> something similar myself, so once you're sure you can write to the >> syslog facility, you should be able to get this to work. >> >> I should probably also point out that unless you really need this to >> go to syslog, you're probably better off writing to a file channel >> instead (less overhead, especially on a busy server). Either way >> there >> is information in the ARM that will help you, >> /usr/share/doc/bind9/arm. >> > > After furher testing, I got my problem solved. > 1. I found named-log is ok to use. > 2. I did not need to change my previous named.conf. > 3. The problem is in /etc/syslog.conf > > With the default /etc/syslog.conf, I have add a line: > local0.* /var/log/messages > There is a difference on where I put it, if I put it at the bottom of > the file, even `logger -p local0.info test` will not work. > If it put that line on the top-most of syslog.conf, everything is > working fine... > > BTW, could anyone explain why putting local0.* /var/log/messages at > the > bottom of syslog.conf will not work? > > Regards > Patrick > >> >> hth, >> >> Doug >> >> -- >> >> This .signature sanitized for your protection >> > > > > > ______________________________________________________________________ > ______________ > Looking for a deal? Find great prices on flights and hotels with > Yahoo! FareChase. > http://farechase.yahoo.com/ > _______________________________________________ > freebsd-isp@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-isp > To unsubscribe, send any mail to "freebsd-isp-unsubscribe@freebsd.org"