sidux.com
Menu

News

Give back
Last 3 Contributions
30-11-2008 20.00
25-11-2008 100.00
25-11-2008 20.00

Donate


Sponsor
hetzner.de

Languages
Preferred language:



Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
devent
Post subject: bind9 and rndc  PostPosted: Jun 15, 2008 - 11:57 PM



Joined: Nov 22, 2007
Posts: 28

Status: Offline
Hallo
I set up a cached only dns server on localhost with bind. But I have the problem that I cannot use rndc with it.

I created a secred-key with
Code:
rndc-confgen -b 512 | grep -m 1 "secret" | cut -d '"' -f 2

and copy it into /etc/bind/named.conf.local and in to the /etc/rndc.conf

Why I can't still use rndc? rndc status get me:
Code:
root:~# rndc status
rndc: connection to remote host closed
This may indicate that
* the remote server is using an older version of the command protocol,
* this host is not authorized to connect,
* the clocks are not syncronized, or
* the key is invalid.


What I'm missing?

Here are the 2 files, "longkey" is the generated key-hash.
/etc/rndc.conf
Code:
key rndc_key {
    algorithm "hmac-md5";
    secret "longkey";
};

options {
    default-server localhost;
    default-key    rndc_key;
};

/etc/bind/named.conf.local
Code:
//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

controls {
    inet 127.0.0.1 allow { localhost; } keys { rndc_key; };
};

key "rndc_key" {
        algorithm hmac-md5;
        secret "longkey";
};
 
 View user's profile Send private message  
Reply with quote Back to top
devent
Post subject: RE: bind9 and rndc  PostPosted: Jun 15, 2008 - 11:58 PM



Joined: Nov 22, 2007
Posts: 28

Status: Offline
The /etc/bind/named.conf is
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 "0.0.127.in-addr.arpa" in {
    type master;
    file "db.127.0.0";
};

include "/etc/bind/named.conf.local";
 
 View user's profile Send private message  
Reply with quote Back to top
devent
Post subject: RE: bind9 and rndc  PostPosted: Jun 15, 2008 - 11:59 PM



Joined: Nov 22, 2007
Posts: 28

Status: Offline
And the /etc/bind/named.conf.options
Code:
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 {
       192.168.0.1;
    };

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

 
 View user's profile Send private message  
Reply with quote Back to top
angor
Post subject: RE: bind9 and rndc  PostPosted: Jun 16, 2008 - 08:51 AM



Joined: Dec 05, 2006
Posts: 37
Location: Duisburg, Germany
Status: Offline
hmm... you *do* include /etc/bind/named.conf.options, perhaps you should consider
named.conf.local as well.
 
 View user's profile Send private message  
Reply with quote Back to top
devent
Post subject: RE: bind9 and rndc  PostPosted: Jun 16, 2008 - 02:53 PM



Joined: Nov 22, 2007
Posts: 28

Status: Offline
I am including /etc/bind/named.conf.local in named.conf. See my second post.

include "/etc/bind/named.conf.local";
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
 
Logos and trademarks are the property of their respective owners, comments are property of their posters, the rest is © 2006-2008 by sidux e.V., 10407 Berlin, Kniprodestr. 104. sidux e.V. is a Berlin, Germany based non-profit foundation. Consult Impressum and Legal Terms for details. sidux™ is Free Software released under the GNU/GPL license and other compatible licenses.
powered by Zikula & Zafenio