I have this rnd.key file on my system:
key "rndc-key1" {
algorithm hmac-md5;
secret "xxxxxxxxxxxxxxx==";
};
key "rndc-key2" {
algorithm hmac-md5;
secret "yyyyyyyyyyy==";
};
Then I use them for different zones:
zone "somedomain1.com" {
type master;
file "/etc/bind/master/db.somedomain1.com";
allow-update {
key rndc-key1;
};
};
zone "somedomain2.com" {
type master;
file "/etc/bind/master/db.somedomain2.com";
allow-update {
key rndc-key2;
};
};
When I try to run "rndc freeze" then I get this error:
rndc: error: /etc/bind/rndc.key:5: 'key' redefined near 'key'
rndc: could not load rndc configuration
What does it mean? What is the problem here? Is it not possible to use different keys for different zones?