Dynamic DNS

Has someone managed to update Linode's DNS using DD-WRT router software?

As I have found out, URL request should be as follows:

https://api.linode.com/?api_key= … DYNAMIC_IP">https://api.linode.com/?apikey=&apiaction=domain.resource.update&DomainID=&ResourceID=&Target=ip< linktext="">>

It's working when I try to update my IP using browser's address field, but I can't find out how to make it work using my router where there are standard fields:

  • Server

  • User Name

  • Password

  • Host Name

  • URL

Any help appreciated.

7 Replies

Linode Staff

You just need something that can make a web request. Doesn't need to be your router.

http://www.linode.com/api/dns/domain.resource.update

If you send the literal string [remote_addr] for the value of the target, our end will substitute it with the requester's IP. No need to scrape your local IP from the router or whatever…

Hope that helps,

-Chris

Thanks, Chris, that will make my task easier!

By the way, are there some reasonable limits regarding the regularity of sending such requests? For example, if I set that line to cron to be executed every half hour, is it too often?

Linode Staff

Changed zones are only published every quarter hour. I think making your API call every 30 or 60 minutes is perfectly acceptable. Thanks for asking :)

-Chris

My approach is to run my script much more frequently (once a minute, I think, might have been once per 5 minutes), but only send a linode API query if the IP has changed, which is pretty rare. For IP change tracking I have my home file server (the thing getting the dynamic IP) call a PHP script on my linode that simply returns the IP of the person accessing the script:

http://fixppp.org/ip.php

The script is basically just like or something.

It required more effort to implement than just a simple linode API call every 30 minutes (which is a single API call), but it lets me get updates much quicker while simultaneously accessing the linode API much less frequently.

This URL gives a 404:

https://www.linode.com/api/dns/domain.resource.update

I can't find the answers on Linode, but am looking for working instructions, with examples, for implementing dynamic DNS subdomains on Linode.

Can anyone assist with that?

Thanks,
PW

@tomezine

The Linode website (and API) will have changed drastically over the last 7+ years, so Chris’s original instructions may not even apply now.

The best I can find for you is the API manual for updating a domain record:

https://developers.linode.com/api/v4/domains-domain-id-records-record-id/#put

This has a one line cURL command to issue a change. There’s no mention of it using the requestor’s IP automatically so you may need a way to get that first (a script on your Linode you can call from your home server that outputs the requesting IP?) then push that IP as a change using the above cURL command.

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