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