|
|
8 年之前 | |
|---|---|---|
| README.md | 8 年之前 | |
| script.sh | 8 年之前 |
Unser Nameserver delta.memory-leak.de muß Master der Zone sein
Wie finde ich das raus?
zone "$zonenname" {
type master;
file "$zonendatei";
};
Wichtig ist in der zweiten Zeile master
Die Zonendatei muß im Ordner /etc/bind/dynamic-zones liegen
.jnlEin für die Zonen-Datei eingetragener Schlüssel, mit dem das Update signiert wird
Mit dem Tool ddns-confgen (in Debian im Paket bind9 enthalten), den erforderlichen Schlüssel generieren:
ddns-confgen -z $ZONE
$ZONE ist die gewünschte Zone, in meinem Fall war das memory-leak.de
root@delta:/etc/bind# ddns-confgen -z memory-leak.dre
# To activate this key, place the following in named.conf, and
# in a separate keyfile on the system or systems from which nsupdate
# will be run:
key "ddns-key.memory-leak.dre" {
algorithm hmac-sha256;
secret "hMZ4fVbpllxEJ93AoTa+PjYeUIXx2FHXLgBTz/fWXlA=";
};
# Then, in the "zone" definition statement for "memory-leak.dre",
# place an "update-policy" statement like this one, adjusted as
# needed for your preferred permissions:
update-policy {
grant ddns-key.memory-leak.dre zonesub ANY;
};
Dem Ergebnis und den Anweisungen schließt man sich nahezu vollständig an.
In die Datei ddns-key.$zone kopiert man den ersten Abschnitt:
root@delta:/etc/bind# cat ddns-key.memory-leak.dre
# To activate this key, place the following in named.conf, and
# in a separate keyfile on the system or systems from which nsupdate
# will be run:
key "ddns-key.memory-leak.dre" {
algorithm hmac-sha256;
secret "hMZ4fVbpllxEJ93AoTa+PjYeUIXx2FHXLgBTz/fWXlA=";
};
Danach integriert man den Schlüssel im System:
root@delta:/etc/bind# cat named.conf.local
...
include "/etc/bind/ddns-key.memory-leak.dre";
Und zu guter Letzt wird der Schlüssel noch für die jeweilige Zone mit seinen Berechtigungen integriert.
Dazu editiert man die Datei named.conf.public-zones:
root@delta:/etc/bind# head -n 8 named.conf.public-zones
zone "memory-leak.de" {
type master;
file "/etc/bind/dynamic-zones/db.memory-leak.de";
// dynamic-zones necessary, because binds named needs to be allowed to write journal files to this directory
// journal files must be created in the directory of the original zone file. BIND BUG?
update-policy { grant ddns-key.memory-leak.de name murnau.memory-leak.de ANY; };
};