My named.conf file is empty

DA31387

Verified User
Joined
Sep 21, 2011
Messages
56
Hi,
After DA installation on Debian 6.0 and domain not resolving, my name servers behave like lame name servers. On trouble shooting, I found my named.conf file empty. Any suggestion? Thanks
 
Check this for recreate zones-link

http://help.directadmin.com/item.php?id=393

Regarding the first part of named.conf here is mine from a debian 5 box

Code:
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local

include "/etc/bind/named.conf.options";

// prime the server with knowledge of the root servers
zone "." {
        type hint;
        file "/etc/bind/db.root";
};

// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912

zone "localhost" {
        type master;
        file "/etc/bind/db.local";
};

zone "127.in-addr.arpa" {
        type master;
        file "/etc/bind/db.127";
};

zone "0.in-addr.arpa" {
        type master;
        file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
        type master;
        file "/etc/bind/db.255";
};

include "/etc/bind/rndc.key";

logging {
        channel b_log {
                file "/var/log/bind9/bind.log" versions 30 size 1m;
                print-time yes;
                print-category yes;
                print-severity yes;
                severity info;
        };

        channel b_debug {
                file "/var/log/bind9/debug.log" versions 2 size 1m;
                print-time yes;
                print-category yes;
                print-severity yes;
                severity dynamic;
        };

        channel b_query {
                file "/var/log/bind9/query.log" versions 2 size 1m;
                print-time yes;
                severity info;
        };

        category default { b_log; b_debug; };
        category config { b_log; b_debug; };
        category queries { b_query; };
  };


include "/etc/bind/named.conf.local";

Regards
 
I ran the script fix.sh, but named.conf remains unfound

I ran the script fix.sh as shown below, but it didn't fix the named.conf problem. What is the exact directory of named.conf file? Can I manually reconstitute it in Debian 6.0?

root@server1:/usr/local/directadmin# chmod -R 755 /etc/fix.sh
root@server1:/usr/local/directadmin# fix.sh
-bash: fix.sh: command not found
root@server1:/usr/local/directadmin# /etc/fix.sh
Checking server1.biomedcircle.net ... Already exists. Skipping
Checking biomedcircle.com ... Already exists. Skipping
Checking luloot.net ... Already exists. Skipping
root@server1:/usr/local/directadmin# nano named.conf
root@server1:/usr/local/directadmin# named-checkzone biomedcircle.net named.conf
zone biomedcircle.net/IN: loading from master file named.conf failed: file not found
zone biomedcircle.net/IN: not loaded due to errors.

Thanks for your help
 
Would re-installing DNS (Bind9) restore the named.conf file

I was wondering if re-installing DNS would restore the named.conf file and whether that would affect DA functionality.
Thanks
 
named.conf file found-we are making progress

I have found the file named.cpnf now, thanks to you!
the hostname domain biomedcicle.net and all other domains are listed. However, I got the following error when I test for biomedcircle.net as described below:

/usr/local/directadmin# named-checkzone biomedcircle.net /etc/bind/named.conf
/etc/bind/named.conf:1: unknown RR type 'This'
dns_master_load: /etc/bind/named.conf:3: unexpected end of line
dns_master_load: /etc/bind/named.conf:2: unexpected end of input
/etc/bind/named.conf:4: unknown RR type 'structure'
/etc/bind/named.conf:5: unknown RR type 'this'
dns_master_load: /etc/bind/named.conf:7: unexpected end of line
dns_master_load: /etc/bind/named.conf:6: unexpected end of input
dns_master_load: /etc/bind/named.conf:9: syntax error
dns_master_load: /etc/bind/named.conf:9: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: /etc/bind/named.conf:9: unbalanced quotes
dns_master_load: /etc/bind/named.conf:10: syntax error
dns_master_load: /etc/bind/named.conf:10: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: /etc/bind/named.conf:10: unbalanced quotes
dns_master_load: /etc/bind/named.conf:11: syntax error
dns_master_load: /etc/bind/named.conf:11: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: /etc/bind/named.conf:11: unbalanced quotes
dns_master_load: /etc/bind/named.conf:12: syntax error
dns_master_load: /etc/bind/named.conf:12: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: /etc/bind/named.conf:12: unbalanced quotes
dns_master_load: /etc/bind/named.conf:13: syntax error
dns_master_load: /etc/bind/named.conf:13: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: /etc/bind/named.conf:13: unbalanced quotes
dns_master_load: /etc/bind/named.conf:14: syntax error
dns_master_load: /etc/bind/named.conf:14: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: /etc/bind/named.conf:14: unbalanced quotes
dns_master_load: /etc/bind/named.conf:15: syntax error
dns_master_load: /etc/bind/named.conf:15: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: /etc/bind/named.conf:15: unbalanced quotes
dns_master_load: /etc/bind/named.conf:16: syntax error
dns_master_load: /etc/bind/named.conf:16: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: /etc/bind/named.conf:16: unbalanced quotes
zone biomedcircle.net/IN: loading from master file /etc/bind/named.conf failed: unknown class/type
zone biomedcircle.net/IN: not loaded due to errors.

Please note that my name servers ns1.biomedcircle.net and ns2.biomedcircle.net are not working and resolv.conf is properly configured:

domain biomedcircle.net
search biomedcircle.net
nameserver 68.87.64.146
nameserver 68.87.75.194

I hope somehow, we can fix this.
Thank you so much for your help!
 
/etc/bind/named.conf:1: unknown RR type 'This'

You got something uncommented.. or some missing "

Post the output ive asked before :)

Regards
 
cat /etc/bind/named.conf file

Here is the output for cat /etc/bind/named.conf:

// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local

include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
zone "server1.biomedcircle.net" { type master; file "/etc/bind/server1.biomedcircle.net.db"; };
zone "178.187.73.50.in-addr.arpa" { type master; file "/etc/bind/178.187.73.50.in-addr.arpa.db"; };
zone "biomedcircle.info" { type master; file "/etc/bind/biomedcircle.info.db"; };
zone "biomedcircle.net" { type master; file "/etc/bind/biomedcircle.net.db"; };
zone "biomedcircle.com" { type master; file "/etc/bind/biomedcircle.com.db"; };

Thank you
 
mmmh.. dont see any error but try remote those lines:

// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local

Regards
 
Did you mean "remove those lines"?

try remote those lines: Did you mean "remove those lines"? I replaced "//" with "#", but the problem remains.
Thanks
 
I use ;, but the problem remains

Here is the new test output:


root@server1:~# named-checkzone biomedcircle.net /etc/bind/named.conf
dns_master_load: /etc/bind/named.conf:9: syntax error
dns_master_load: /etc/bind/named.conf:9: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: /etc/bind/named.conf:9: unbalanced quotes
dns_master_load: /etc/bind/named.conf:10: syntax error
dns_master_load: /etc/bind/named.conf:10: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: /etc/bind/named.conf:10: unbalanced quotes
dns_master_load: /etc/bind/named.conf:11: syntax error
dns_master_load: /etc/bind/named.conf:11: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: /etc/bind/named.conf:11: unbalanced quotes
dns_master_load: /etc/bind/named.conf:12: syntax error
dns_master_load: /etc/bind/named.conf:12: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: /etc/bind/named.conf:12: unbalanced quotes
dns_master_load: /etc/bind/named.conf:13: syntax error
dns_master_load: /etc/bind/named.conf:13: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: /etc/bind/named.conf:13: unbalanced quotes
dns_master_load: /etc/bind/named.conf:14: syntax error
dns_master_load: /etc/bind/named.conf:14: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: /etc/bind/named.conf:14: unbalanced quotes
dns_master_load: /etc/bind/named.conf:15: syntax error
dns_master_load: /etc/bind/named.conf:15: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: /etc/bind/named.conf:15: unbalanced quotes
dns_master_load: /etc/bind/named.conf:16: syntax error
dns_master_load: /etc/bind/named.conf:16: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: /etc/bind/named.conf:16: unbalanced quotes
zone biomedcircle.net/IN: loading from master file /etc/bind/named.conf failed: syntax error
zone biomedcircle.net/IN: not loaded due to errors.

Is there something fundamentally wrong with the DNS installation? Should I remove dns and re-install?
Thanks for all your help
 
mmmh

mv that named.conf to named.conf.bk and create a new one like this:


Code:
include "/etc/bind/named.conf.options";

// prime the server with knowledge of the root servers
zone "." {
        type hint;
        file "/etc/bind/db.root";
};

// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912

zone "localhost" {
        type master;
        file "/etc/bind/db.local";
};

zone "127.in-addr.arpa" {
        type master;
        file "/etc/bind/db.127";
};

zone "0.in-addr.arpa" {
        type master;
        file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
        type master;
        file "/etc/bind/db.255";
};

include "/etc/bind/rndc.key";

logging {
        channel b_log {
                file "/var/log/bind9/bind.log" versions 30 size 1m;
                print-time yes;
                print-category yes;
                print-severity yes;
                severity info;
        };

        channel b_debug {
                file "/var/log/bind9/debug.log" versions 2 size 1m;
                print-time yes;
                print-category yes;
                print-severity yes;
                severity dynamic;
        };

        channel b_query {
                file "/var/log/bind9/query.log" versions 2 size 1m;
                print-time yes;
                severity info;
        };

        category default { b_log; b_debug; };
        category config { b_log; b_debug; };
        category queries { b_query; };
  };

zone "server1.biomedcircle.net" { type master; file "/etc/bind/server1.biomedcircle.net.db"; };
zone "178.187.73.50.in-addr.arpa" { type master; file "/etc/bind/178.187.73.50.in-addr.arpa.db"; };
zone "biomedcircle.info" { type master; file "/etc/bind/biomedcircle.info.db"; };
zone "biomedcircle.net" { type master; file "/etc/bind/biomedcircle.net.db"; };
zone "biomedcircle.com" { type master; file "/etc/bind/biomedcircle.com.db"; };

Let me know

Regards
 
mv named.conf to named.conf.bk

Just to be sure, you want me to delete named.conf and replace it with named.conf.bk. Am I right? Or do I just change named.conf to named.conf.bk with the new content? If so, what's the command line to change the name?
Thanks
 
Your actual named.conf have to be renamed to named.conf.bk (for have the original copy just in case)

Then touch named.conf and edit it pasting the one i gave

Regards
 
change named.conf to named.conf.bk

Hi,
The problem remains after I changed the file named.conf to named.conf.bk (while keeping the original) and substituting the content you gave me for the file.
Best regards
 
cat /etc/bind/named.conf.options

I see two problems with this file: 1) there are no forwarders; 2) "//" should be replaced with ";" from the comment lines:

root@server1:~# cat /etc/bind/named.conf.options
options {
directory "/var/cache/bind";

// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113

// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.

// forwarders {
// 0.0.0.0;
// };

auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};

I will give you an update soon
Thanks
 
Back
Top