Is there a way to self-host a dynamic DNS service? I really like the flexibility of DynDNS et al, but I'd like to host my own dynamic DNS service so I can have better control and the ability to send my owned domains to the nameserver without having to pay a fee. Are FOSS implementations of dynamic DNS available, or is there a way to do this in BIND?
1 Answer
bind
v9 has support for dynamic updates:
zone "example.net" {
type master;
file "zones/example.net.db";
update-policy local;
auto-dnssec allow;
key-directory "keys/example.net";
};
You can use
nsupdate
to manage the zone locally,or call
nsupdate
from a CGI script (accessed by the client PC, like DynDNS updater),or use
nsupdate
remotely using TSIG.zone "example.net" { update-policy { grant <keyname> name <hostname> A AAAA TXT; //grant * self * A AAAA TXT; }; }; key <keyname> { algorithm HMAC-MD5; secret "<keydata>"; };
(docs:
update-policy
)Windows has native support DDNS using GSS-TSIG, which requires a working Kerberos setup (not necessarily Active Directory).
In a local network, updates can be performed by either the DHCP client (ISC
dhclient
) or server (ISCdhcpd
). This is also described in the Secure dynamic DNS page.bind
can automatically sign dynamic zones.