Bind Problem!

Taking care of your Linux box.
Post Reply
telenor
Havaldaar
Posts: 104
Joined: Tue Mar 29, 2005 11:08 am

Bind Problem!

Post by telenor »

AOA,

I am using FC7.My issue regarding named.stats file, here are details:

BIND Version:
bind-9.4.2-4.fc7

NAMED.CONF FILe:
#vi /etc/named.caching-nameserver.conf
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver
// (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//

options {
#listen-on port 53 { 127.0.0.1; };
#listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
zone-statistics yes;
statistics-file "/var/named/stats/named.stats";
memstatistics-file "/var/named/data/named_mem_stats.txt";
// allow-query { localhost; };
recursion yes;
};


But when i ran :
#rndc stats
rndc: 'stats' failed: file not found


Also named.stats file is not found anywhere on the system.
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Post by lambda »

did you restart bind after adding those lines to your named.conf? does the /var/named/stats/ exist on your system? why are you placing one file in /var/named/stats/ and the other in /var/named/data/?

is named running under a chroot? if so, the path to the files may need to be changed.
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
thecooldude
Lance Naik
Posts: 43
Joined: Sun Nov 26, 2006 6:04 pm
Location: Dubai, UAE.
Contact:

sample.

Post by thecooldude »

Well, here is the example of my named.



//
// named.conf for Red Hat caching-nameserver
//

options {
forwarders { 202.154.235.35; };
forward only;
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};

//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};

zone "." IN {
type hint;
file "named.ca";
};

zone "localdomain" IN {
type master;
file "localdomain.zone";
allow-update { none; };
};

zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "c2c.org" IN {
type master;
file "c2c.zone";
allow-update { none; };
};
zone "0.168.192.in-addr.arpa" IN {
type master;
file "c2c.local";
allow-update { none; };
};

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" IN {
type master;
file "named.ip6.local";
allow-update { none; };
};

zone "255.in-addr.arpa" IN {
type master;
file "named.broadcast";
allow-update { none; };
};

zone "0.in-addr.arpa" IN {
type master;
file "named.zero";
allow-update { none; };
};

include "/etc/rndc.key";
Post Reply