Bind9 Trouble [SOLVED] ** server can't find foobar.com:

I just did apt-get install bind9.

Then i created the master zone file for cggts.com, and its db file.

When I reload, i get the following. (I also cant seem to find the log files for bind)

nslookup -sil cggts.com
Server:         127.0.0.1
Address:        127.0.0.1#53

** server can't find cggts.com: SERVFAIL

I know i must be missing something silly. (Note I did not make any changes to any other files.)

contents of /etc/resolve.conf

 nameserver      127.0.0.1 

Here is the DB file for cggts.com:

$ORIGIN .
$TTL 3600 ; 1 hour
cggts.com     IN    SOA    cggts.com.    hamad.cggts.com. (
                2          ; serial
                3600       ; refresh (1 hour)
                900        ; retry (15 minutes)
                259200     ; expire (3 days)
                86400      ; minimum (1 day)
                )
@        IN    NS    ns.cggts.com.
@        IN    NS   ns2.everydns.net. 
@        IN    A    70.85.31.27
ns       IN    A    70.85.31.27
www      IN    A    70.85.31.27

Bellow is my named.conf

/ This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian for information on the 
// structure of BIND configuration files in Debian, *BEFORE* you customize 
// this configuration file.
//

options {
        directory "/var/cache/bind";

        // 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 and later use an unprivileged
        // port by default.

        // query-source address * port 53;

        // 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

};

// 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";
};

// add entries for other zones below here

zone "tribalsage.com" {
     type master;
     file "tribalsage.com.db";
     allow-query { any; };
     allow-update { localhost; }; 
     };

zone "cggts.com" {
     type master;

     file "cggts.com.db";
     allow-query { any; };
     allow-update { localhost; }; 
     };

1 Reply

Im sure this applies to a lot of distros. In my case however im using Debian Small.

Pay close attention to :

options {
        directory "/var/cache/bind";

This is where bind expects to find zone/config files.

All my files where placed in /etc/bind/.

In order to fix this i did the following:

cd /var/cache/bind
cp /etc/bind/* .

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct