On Sat, Sep 24, 2005 at 09:59:12PM -0700, the unit calling itself Bryan Irvine
wrote:
> > named[1028]: unable to rename log file 'named_query.log' to
> > 'named_query.log.0': permission denied
> >
> > The logfiles are in /var/named... do I need to chgrp on this directory?
>
>
> Yes, typical Unix stuff. Check r/w and uid/gid permissions.
Hmmm... I chgrp'd the logfiles (/var/named/named_query.log) to
"named", but it is still busted... I don't get error messages on the
console any longer, but nothing is being recorded in the log files.
I think I used a "recipe" for setting up the caching name server on this
box. I thought it was on the OpenBSD website, but I cannot find it now.
Here's how I'm set up. Any comments would be appreciated:
In /etc/rc.conf.local:
named_flags=""
In /etc/resolv.conf:
nameserver 127.0.0.1
lookup file bind
nameserver 207.203.159.252
# ls -l /var/named
total 5
drwxr-xr-x 2 root wheel 512 Sep 24 23:02 dev
drwxr-x--- 2 root named 512 Mar 20 2005 etc
drwxr-xr-x 2 root wheel 512 Mar 29 2004 master
-rw-r--r-- 1 root named 0 Sep 24 23:26 named_query.log
-rw-r--r-- 1 root named 0 Sep 24 23:26 named_query.log.0
drwxrwxr-x 2 root named 512 Mar 29 2004 slave
drwxr-xr-x 2 root wheel 512 Mar 29 2004 standard
In /var/named/etc/named.conf:
// $OpenBSD: named-simple.conf,v 1.5 2003/09/22 20:44:32 jakob Exp $
//
// Example file for a simple named configuration, processing both
// recursive and authoritative queries using one cache.
// Update this list to include only the networks for which you want
// to execute recursive queries. The default setting allows all hosts
// on any IPv4 networks for which the system has an interface, and
// the IPv6 localhost address.
//
acl clients {
localnets;
::1;
};
options {
forward only;
forwarders { 207.203.159.252; 205.152.0.5; };
version ""; // remove this to allow version queries
listen-on { any; };
listen-on-v6 { any; };
allow-recursion { clients; };
};
logging {
channel query_info {
file "named_query.log" versions 3 size 10m;
severity debug;
print-category yes;
print-time yes;
};
category queries { query_info; };
category resolver { query_info; };
// category lame-servers { null; };
};
// Standard zones
//
zone "." {
type hint;
file "standard/root.hint";
};
zone "localhost" {
type master;
file "standard/localhost";
allow-transfer { localhost; };
};
zone "127.in-addr.arpa" {
type master;
file "standard/loopback";
allow-transfer { localhost; };
};
zone
"0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa"
{
type master;
file "standard/loopback6.arpa";
allow-transfer { localhost; };
};
zone
"0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.int"
{
type master;
file "standard/loopback6.int";
allow-transfer { localhost; };
};
zone "com" {
type delegation-only;
};
zone "net" {
type delegation-only;
};
// Master zones
//
//zone "myzone.net" {
// type master;
// file "master/myzone.net";
//};
// Slave zones
//
//zone "otherzone.net" {
// type slave;
// file "slave/otherzone.net";
// masters { 192.0.2.1; [...;] };
//};