named fail - Locating /var/named/chroot//etc/named.conf failed Print

  • 3

named fail with error

Locating /var/named/chroot//etc/named.conf failed: [FAILED]

SSH to server as root. run command

updatedb
locate named.conf
/etc/dbus-1/system.d/named.conf
/usr/share/doc/bind-9.3.3/sample/etc/named.conf
/usr/share/logwatch/default.conf/services/named.conf
/usr/share/man/man5/named.conf.5.gz

apply command

mkdir -p /var/named/chroot/etc
cp /usr/share/doc/bind-9.3.3/sample/etc/named.conf /var/named/chroot/etc
cp /usr/share/doc/bind-9.3.3/sample/etc/named.root.hints /etc/named.root.hints
cp /usr/share/doc/bind-9.3.3/sample/etc/named.root.hints /var/named/chroot/etc

apply command

nano /var/named/chroot/etc/named.conf

delete the whole part:

view "localhost_resolver"
{
/* This view sets up named to be a localhost resolver ( caching only nameserver ).
* If all you want is a caching-only nameserver, then you need only define this view:
*/
match-clients { localhost; };
match-destinations { localhost; };
recursion yes;
# all views must contain the root hints zone:
include "/etc/named.root.hints";

/* these are zones that contain definitions for all the localhost
* names and addresses, as recommended in RFC1912 - these names should
* ONLY be served to localhost clients:
*/
include "/etc/named.rfc1912.zones";
};
view "internal"
{
/* This view will contain zones you want to serve only to "internal" clients
that connect via your directly attached LAN interfaces - "localnets" .
*/
match-clients { localnets; };
match-destinations { localnets; };
recursion yes;
// all views must contain the root hints zone:
include "/etc/named.root.hints";

// include "named.rfc1912.zones";
// you should not serve your rfc1912 names to non-localhost clients.

// These are your "authoritative" internal zones, and would probably
// also be included in the "localhost_resolver" view above :

zone "my.internal.zone" {
type master;
file "my.internal.zone.db";
};
zone "my.slave.internal.zone" {
type slave;
file "slaves/my.slave.internal.zone.db";
masters { /* put master nameserver IPs here */ 127.0.0.1; } ;
// put slave zones in the slaves/ directory so named can update them
};
zone "my.ddns.internal.zone" {
type master;
allow-update { key ddns_key; };
file "slaves/my.ddns.internal.zone.db";
// put dynamically updateable zones in the slaves/ directory so named can update them
};
};
key ddns_key
{
algorithm hmac-md5;
secret "use /usr/sbin/dns-keygen to generate TSIG keys";
};
view "external"
{
/* This view will contain zones you want to serve only to "external" clients
* that have addresses that are not on your directly attached LAN interface subnets:
*/
match-clients { !localnets; !localhost; };
match-destinations { !localnets; !localhost; };

recursion no;
// you'd probably want to deny recursion to external clients, so you don't
// end up providing free DNS service to all takers

// all views must contain the root hints zone:
include "/etc/named.root.hints";

// These are your "authoritative" external zones, and would probably
// contain entries for just your web and mail servers:

zone "my.external.zone" {
type master;
file "my.external.zone.db";
};
};

Add your own zones if needed.


Was this answer helpful?

« Back