Bind9 Dynamic DNS

编写于

Dyndns is so nice!

1.KeyGen:

#dnssec-keygen -a HMAC-MD5 -b 128 -n HOST ddns-key
Kddns-key.+157+17069.key
Kddns-key.+157+17069.private

2.Configure bind name.conf.local. add blow lines:
key ddns-key {
algorithm HMAC-MD5.SIG-ALG.REG.INT;
secret “[key in public file]“;
};

zone “example.com” {


allow-update { key ddns-key; };
};

3.Use public key to update zone file
nsupdate -v << EOF
server ns1.example.com
key ddns-key [key in public file]
zone example.com.
update delete test.example.com. 300 A
update add test.example.com. 300 A 192.168.0.22
show
send
EOF