Skip to content
DynDNS

DynDNS

DynDNS is FreeGateway’s dynamic DNS system. It keeps a hostname pointing at a system whose IP address is assigned by DHCP and can change at any time, so that the system gets most of the benefits of a static IP address. It works with your own PowerDNS authoritative DNS server, and both of its daemons are written in C++ for FreeBSD.

Built for Gateway

DynDNS is aimed primarily at Gateway. A branch office whose Gateway gets its address from a DHCP server can still be reached by hostname, because the DNS record is updated automatically whenever the address changes.

DynDNS assumes that you operate a FreeBSD server running PowerDNS as your authoritative DNS server, configured with the SQLite3 backend. If you don’t have one yet, FreeGateway’s powerdns_manager.py script can set up a PowerDNS authoritative server backed by a SQLite3 database.

Two daemons

DaemonRuns onRole
dyn_dns_clientThe client system, whose IP address is assigned by DHCPPeriodically sends the system’s current IP address to the DNS server
powerdns_updaterThe DNS server, alongside PowerDNSReceives and checks notifications from registered clients, and updates their hostname and address records in PowerDNS’s SQLite3 database

How it works

The client periodically sends a message to the server containing its current IP address in an encrypted payload. The server receives the message and runs a series of tests on it to confirm that it is valid. If it is valid and the client’s address has changed, the server updates the client’s record in the database.

These periodic messages also act as a heartbeat, so the server always knows the status of every registered client.

Secure communication

DynDNS uses a UDP version of the channel that Yumei uses for its TCP-based cluster communications. It is built on the Sodium cryptographic library and uses pre-shared public keys. DynDNS does not use TLS, and it does not depend on Yumei.

Registration and management

Clients are currently registered from the command line, and the daemons are managed over SSH. Registration from the System Dashboard, on both the Gateway and the DNS server, is planned for a later release.