Subject: Re: dynamic dns update by dhcpd.[SEC=UNCLASSIFIED]
To: None <netbsd-users@NetBSD.org>
From: Matthias Scheler <tron@zhadum.org.uk>
List: netbsd-users
Date: 08/19/2007 15:47:31
On Sun, Aug 19, 2007 at 10:22:46PM +1000, Paul (NCC/CS.) wrote:
> how can I get updates into the dns from dhcpd when
> a new machine comes on my network?
Put something like this into your "/etc/dhcpd.conf":
ddns-domainname "dhcp.bom.gov.au";
ddns-rev-domainname "in-addr.arpa";
ddns-updates on;
ddns-update-style interim;
include "/var/chroot/named/etc/dns.keys";
zone zhadum.intern. {
primary 10.3.2.1;
key dhcp-key.bom.gov.au;
}
And this is the according configuration in "/var/chroot/named/etc/named.conf":
include "/etc/dns.keys";
zone "2.3.10.IN-ADDR.ARPA" {
type master;
file "db.10.3.2";
allow-update {
key dhcp-key.bom.gov.au
};
};
zone "dhcp.bom.gov.au" {
type master;
file "dynamic/db.dhcp.bom.gov.au";
allow-update {
key dhcp-key.bom.gov.au
};
};
Use "rndc-confgen" generate the file "/var/chroot/named/etc/dns.keys" and
use an editor to remove everything except the key section. The result
should look like this:
key "dhcp-key.bom.gov.au" {
algorithm hmac-md5;
secret "sCUNxcRGtvLvvdNM+S1DTQ==";
};
Make sure that the file has permission 640 and is owned by user "root"
and group "named".
Kind regards
--
Matthias Scheler http://zhadum.org.uk/