I am dong something similar on an openstack cloud for instance DNS name updates (probably not as dynamically as your requirement ;-), basically we have a bind named
instance that accept dynamic updates.
I used webmin to configure the remote control using RNDC, and the basic bind configuration.
and then generate a key for remote access, and distribute it to your control node;
dnssec-keygen -a hmac-md5 -b 128 -n HOST remote-key
the zone-file ends up like this;
zone "mydomain.com" {
type master;
file "master/mydomain.com";
allow-update { key "remote-key"; };
};
allow-update
provides the permission to update the master zone, allow-notify
is the slave zone equivalent.
and then you can do something like this (nsupdate
from bind-utils) to update the records from a client, I've not tested a CNAME update, but it should look something like this;
cat <<EOF | nsupdate -d -k "$KEY"
server ns1.mynameserver.com
zone domain.com
update delete gf53ef.domain.com.
update add gf53ef.domain.com. IN CNAME ec2-176-34-163-40.eu-west-1.compute.amazonaws.com.
send
EOF
(you might have to double check the format for the CNAME example...)
This seems to be the configuration reference docs for named
;
http://www.zytrax.com/books/dns/ch7/xfer.html
Examples can be obtained from these tutorials;
http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-bind-rndc.html
http://dag.wieers.com/howto/bits/bind-ddns.php
http://linux.yyz.us/nsupdate/
http://www.semicomplete.com/articles/dynamic-dns-with-dhcp/