Add zones from remote rndc to view
I have two master servers that share two slaves. Master A is a traditional bind server that uses also-notify to update the slaves. Master B is a plesk server that manages bind by itself and uses rndc to add zones to the slaves.
However I now need to use views on master A but because plesk manages bind on master B it's not possible to add the views there.
I've added the views to the slaves and master A. Master A is able to notify slaves about zones in the views no problem. But zones in master B don't work.
client master-b#5056: view public: received notify for zone 'domain.com': not authoritative
Master A config:
view "public" {
match-clients { key public-key; !key internal-key; any; };
server slave-a-ip { keys public-key; };
server slave-b-ip { keys public-key; };
include "named.public.zones";
include "named.common.zones";
};
view "internal" {
match-clients { key internal-key; !key public-key; internal-acl; };
server slave-a-ip { keys internal-key; };
server slave-b-ip { keys internal-key; };
include "named.internal.zones";
include "named.common.zones";
};
Slave config:
controls {
inet * port 953 allow { master-b-ip; 127.0.0.1; } keys { "rndckey"; "rndc-key-master-b"; };
};
view "public" {
match-clients { key public-key; !key internal-key; any; };
server master-a-ip { keys public-key; };
include "named.public.zones";
include "named.common.zones";
};
view "internal" {
match-clients { key internal-key; !key public-key; internal-acl; };
server master-a-ip { keys internal-key; };
include "named.internal.zones";
include "named.common.zones";
};
Is it possible for zones added through rndc from master-b to go into the public view?
Solution 1:
Is it possible for zones added through rndc from master-b to go into the public view?
Yes.
As per the rndc
documentation, the addzone
command takes an optional view argument:
addzone zone [class [view]] configuration
That however, leaves a different question, whether you can make that work with your Plesk-based setup (it would need to specify the name of the desired view when it adds the zone).