[plug] Linux Client to update DNS server
Brad Campbell
brad at fnarfbargle.com
Wed Apr 18 15:17:34 WST 2012
On 18/04/12 13:52, Alexander Hartner wrote:
> Hi all,
>
> I am about to create a network with many linux systems. To make live easy I am looking for a method to allow each client to update the DNS server itself. I know there are lot of other solutions to map names to IP addresses using MAC address maps on the DHCP server, however those are not suitable for this environment. I really need a solution for the clients to update the DNS record themselves.
I do this at home for a chunk of my network. Debian server with bind9
and isc dhcp server.
dhcpd.conf snip
subnet 192.168.253.0 netmask 255.255.255.0 {
server-identifier 192.168.253.1;
range 192.168.253.2 192.168.253.254;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.253.255;
option server.ddns-domainname = "vm.home.";
one-lease-per-client on;
default-lease-time 14400;
max-lease-time 14401;
authoritative;
option ip-forwarding off;
option routers 192.168.253.1;
option domain-name-servers 192.168.2.1;
option netbios-name-servers 192.168.2.1;
}
bind.conf.local snip
zone "vm.home" {
type master;
file "/etc/bind/db.home.vm";
allow-update { key "rndc-key"; };
};
zone "253.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.192.168.253";
allow-update { key "rndc-key"; };
};
As each client is assigned an address, both the forward and reverse are
updated dynamically.
Works a _treat_.
I'm pretty sure I did not make any other changes. The trick was making
sure rndc.key was the same in /etc/bind/ and /etc/dhcp/. I'm sure it's a
hack but it has worked very well for over a year.
Most modern linux distributions have the required :
send host-name "<hostname>";
in the dhclient.conf. With some older versions of the dhcp client you
needed to manually specify the host name to send.
With any windows more recent than 2000, it just works as it does for my
ipads, blackberries and other miscellaneous wireless garb.
The important thing is the dhcp server can properly authenticate with bind.
hth.
Brad
More information about the plug
mailing list