DDNS clients

I set up a new router and so once again am trying to figure out the hack I need for Dynamic DNS updating. I use afraid.org for DDNS and I need something on my home network so that if my IP address changes I notify afraid to update my record. And boy it’s complicated. In the past my router firmware (Tomato or OpenWRT) seemed to handle it for me, but my new router (Ubiquiti EdgeMAX) isn’t working. It has a DDNS client, but it’s fail.

Why so complicated? Because of history. In the bad old days there were all these complicated protocols for DDNS. Software like ddclient has support for a zillion different proprietary protocols. But DDNS has mostly now stabilized on “fetch this URL with a secret token to refresh your IP address”, taking the IP address implicitly from the source of the HTTP request. And that’s all we need. afraid acknowledges this, with a sample cron job which fetches every 5 minutes. Done.

Well not quite. Ideally you’d only post an update if your IP address actually changed. And ideally you’d update immediately, not every 5 minutes. This is possible (and implemented in the Tomato router) but it’s too much work to figure out how to do it. So the cron job it is.

One last wrinkle; afraid has two versions of the dynamic update. v1 and v2. Conceptually they’re the same, but v2 has improvements. The one I like is v2 doesn’t say “ERROR” if you post an update without a change, it just acknowledges that nothing changed. You have to opt names into the v2 interface in the web UI first.

I like how afraid’s example cron job is randomized so it runs at a random second, not exactly at 00:00:00 and 00:05:00, … Thundering herds are bad.