1.) Using BIND 9's dnssec-keygen to create the key used between dhcpd and named for communication:
dnssec-keygen -a HMAC-MD5 -b 128 -n USER DHCP_UPDATER
2.) /etc/dhcpd.conf config for ddns:
[root@nosmo root]# cat /etc/dhcpd.conf
ddns-update-style interim;
[color=#0000FF][b]allow client-updates;[/b][/color]
option time-offset -25200; #PDT
#
# Shire
#
subnet 172.30.4.0 netmask 255.255.255.0 {
option routers 172.30.4.1;
option subnet-mask 255.255.255.0;
option domain-name "Shire";
option domain-name-servers 172.30.4.107;
range dynamic-bootp 172.30.4.150 172.30.4.199;
default-lease-time 21600;
max-lease-time 43200;
}
[color=#0000FF][b]key DHCP_UPDATER {
algorithm HMAC-MD5.SIG-ALG.REG.INT;
secret IVPnmoTz49h6ENRV2eME7Q==;
};[/b][/color]
[color=#0000FF][b]zone SHIRE. {
primary 172.30.4.107;
key DHCP_UPDATER;
}
zone 4.30.172.in-addr.arpa. {
primary 172.30.4.107;
key DHCP_UPDATER;
}[/b][/color]
3.) /etc/named.conf config for ddns:
[root@r1 ~]# cat /etc/named.conf
options {
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
[color=#0000FF][b]key DHCP_UPDATER {
algorithm HMAC-MD5.SIG-ALG.REG.INT;
secret IVPnmoTz49h6ENRV2eME7Q==;
};[/b][/color]
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone "shire" IN {
type master;
file "db.shire";
[color=#0000FF][b]allow-update { key DHCP_UPDATER; };[/b][/color]
};
zone "4.30.172.in-addr.arpa" IN {
type master;
file "db.4.30.172";
[color=#0000FF][b]allow-update { key DHCP_UPDATER; };[/b][/color]
};
zone "rivendell" IN {
type master;
file "db.rivendell";
allow-update { none; };
};
zone "2.168.192.in-addr.arpa" IN {
type master;
file "db.2.168.192";
allow-update { none; };
};
zone "mordor" IN {
type master;
file "db.mordor";
allow-update { none; };
};
zone "3.168.192.in-addr.arpa" IN {
type master;
file "db.3.168.192";
allow-update { none; };
};
// A key file needs to be referenced for use by rndc
include "/etc/rndc.key";