I recently needed a dynamic DNS updater client. Being rather unsatisfied with the existing ones, I decided to write my own in Rust. This is the first actual Rust program I have written. If you attempt to use this on your own machine, do be aware that it has very limited error handling.

The primary advantages of my dynamic DNS updater are:

  • Does not require polling. It instead uses Netlink to get actively informed of IP address changes (and as such only works on Linux).
  • Supports both IPv4 and IPv6
    • Supports updating additional extra hosts that share the same IPv6 /64 prefix

However, this program does require nsupdate as an external runtime dependency to actually perform the DNS updates.

This tool takes three command-line arguments: the "upstream" network interface, the "downstream" network interface, and a configuration file. The "upstream" network interface is used to update the IPv4 and IPv6 address of the main host. The "downstream" network interface will have its IPv6 /64 prefix extracted and combined with suffixes specified in the config file to update the additional extra hosts. The config file must be formatted exactly as follows:

<path to nsupdate key file>
<main hostname>
<extra hostname> <extra hostname address suffix>
<extra hostname> <extra hostname address suffix>

For example, the following is a working configuration file:

/etc/rqou-ddns/ abcd:ef00:1234:5678 abcd:ef00:1234:5679