Set up a dynamic DNS with a subdomain?

I have my domain set up and working in Linode manager, with the www getting served correctly via apache.

What I want to do (if at all possible) is take a subdomain, for instance home.mydomain.com and point it to my home IP address. The problem is that my home IP address is dynamic (with no option whatsoever to upgrade to static) so it will change (but probably not frequently).

Is there a way I can make this work? I'm happy to pay for a service to do this, but sadly most of the information I could find on this subject is outdated or doesn't apply in this situation.

Thanks. :)

5 Replies

Yes, via the API. Here's an example to get you started: https://github.com/snorp/linode/blob/ma … eDynDNS.py">https://github.com/snorp/linode/blob/master/LinodeDynDNS.py

Awesome! I actually had to use the script from this pull request though, as the API seems to have changed since the script was written: https://raw.github.com/Andomar/LinodeDy … eDynDNS.py">https://raw.github.com/Andomar/LinodeDynDns/90423fa02a99674145bb2aa759426d47ed6c0d7e/LinodeDynDNS.py

Obviously this requires you to run the script on your network somewhere, which can be a pain at times. Some routers offer Dynamic DNS features, which could be as simple as accessing a webpage somewhere. You could modify or take inspiration from that script to run on your linode. Of course, you would need to make sure it's adequately protected, and working as your router would expect.

I've set this up as a cron job on my NAS, which seems to work great.

I'm also using my Linode DNS for dynamic DNS. A cron job on my home file server checks the IP (by calling a script on the Linode) once a minute, and if it has changed, submits a Linode API request to update the IP (which has a small TTL).

Yes, I realize that you can simplify the script by just telling Linode (via the API) to update to your current IP address, but then you're hammering Linode's API servers once a minute (bad) instead of your own servers once a minute (acceptable).

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct