2

I use Dynamic DNS services to get a named address for a computer which does not have a fixed IP address.

I used to get this service from dyndns.org - but they went fully for-pay. Then I switched to no-ip.me, which I use now, but these people require an update once a week, and very often updates don't "take" for some reason (or the inadyn client has trouble with timeouts maybe), so my hostnames do occasionally get disabled/half-deleted, and that's a bit nerve-racking.

Anyway, I'd like to switch to someplace else.

Requirements:

  • Gratis.
  • Required update frequency, if any, is no higher than, say, once in 30 days.
  • Allows at least three hostnames per account.
  • FOSS update client which works on GNU/Linux.
  • Does not require you to set up anything on a machine with a fixed IP address.

Preferably:

  • Does not require updates if the address doesn't change (or, say, requires an update a year or something like that)
  • Low latency of A record update.
  • Has multiple update clients supporting it.
  • Gratis MX records.
  • I've setup my own back then when DynDNS went for those crazy prizes. 30min one-time setup, then it runs without any maintenance (not sure what for we shall pay EUR 5 per month for something like that). But that would require you running your own DNS service (which I do for my domains). If interested in such a solution, let me know and I make it an answer. – Izzy Jul 15 '16 at 7:03
  • @Izzy: Do make it an answer, that sounds interesting, albeit not a recommendation for software. – einpoklum Jul 15 '16 at 8:49
  • Well, now that you mention it: you didn't ask for software in the first place, but for a service. I would recommend you a software to self-host, which would fit this site :) But that needs to wait until I'm home again (where my notes on it are). Raw essentials: Requires a (Linux) server with Bind9, plus a PHP web server. This machine must act as primary DNS for the domain you wish to use (should work for a sub-domain, too, though I haven't tried that). You will need "root access" to that host. Details later, as said. – Izzy Jul 15 '16 at 9:29
1

BIND (Berkeley Internet Name Domain), a DNS server, can do that for you. A German Howto (Google-translated variant) shows you how to set that up on your own server. An extract here:

Requirements

  • A Linux machine with fixed IP that acts as DNS and Web server
  • Software: Apache Webserver (any other webserver should do as well), Bind. Both are available in the standard repositories of almost every Linux distribution.

Configuration

In the following lines, replace example.com by your own domain.

Bind

  1. Create a key: /usr/sbin/ddns-confgen -z example.com
  2. Store the key into a file, e.g. /usr/local/etc/ddns-key.example.com
  3. Either
    • include that file in your /etc/bind/named.conf:
      include "/usr/local/etc/ddns-key.example.com";
    • or copy-paste it into /etc/bind/named.conf.local
  4. Copy-paste the "update-policy" into the "zone" block of "example.com", e.g.

    update-policy {
          grant ddns-key.example.com zonesub ANY;
    };
    
  5. At the end of your zone file (/etc/bind/example.com), add the following lines:

    $ORIGIN example.com
    $TTL 60 ; 1 min time-to-live
    myhost A 192.168.1.11 ; any IP will do initially
    
  6. Restart bind (a reload is not enough): service bind9 restart

Web Server

Here you need a simple PHP script, an example can be found on the linked page. It expects username and password as URL parameters (which it then compares with its own settings), and obtains the current IP via a third parameter (you could also simply evaluate $_SERVER['REMOTE_ADDR'] instead), then writes the latter to a file.

Updater Script via Cron

The third component is a simple shell script invoked via Cron (a 5min interval should be sufficient). This checks for the file, compares the IP address with a backup from the previous run, and if it changed calls to Bind for an update. Finally it overwrites the backup (from the previous run) with the current file.

The Client

Easy-peasy. Just something that calls the web page and authenticates. I strongly recommend using HTTPS here (after all, you submit your user and password as URL parameters – so anyone capturing that could afterwards foul your DynDNS). Simplest thing is a Cron job doing so via Curl or WGet every 30min or so. If you've got something that notices your IP change, all the better – let that call the URL then. No special "client software" needed.


Verdict

It would go beyond the scope of this site to include the entire setup (I personally use an extended version of this, which can support multiple clients). I can really recommend this setup: as written initially, the software I recommend here is BIND which runs very stable and is used on quite many installations, being the de-facto standard for name servers. I run this since the day DynDNS went "completely paid" (which was more than 2 years ago) – and except for about an hour to set it up once, I've never actually touched it anymore: it simply works.

| improve this answer | |
  • 2
    Ahh... oh... well, I don't have a machine with a fixed address, otherwise I wouldn't need Dynamic DNS... I should have made that clear in the question I guess. Sorry. – einpoklum Jul 16 '16 at 20:57
  • Well, one doesn't exclude the other: I have a server with fixed IP at a hoster, but still need DynDNS for my machine at home. As a side-effect I could use the same thing to give all my mobile devices a "global name" :) – Izzy Jul 16 '16 at 21:05
1

Try afraid.org, the site looks old, but they offer a very full featured service. It does have a free plan, with I think 5 free domains, they don't have a required update interval, and you can update the IP of a domain with https://[USERNAME]:[PASSWORD]@freedns.afraid.org/nic/update?hostname=[DOMAIN]&myip=[IP]. The API docs are here.

Also check out DuckDNS, I personally use both.

| improve this answer | |
  • Does afraid.org offer addresses under afraid.org ? I'm a bit afraid to use those... :-( – einpoklum Mar 11 at 21:16
  • I am not sure.‍‍ – Perhaps you see this name. Mar 13 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.