| Linode Forum https://forum.linode.com/ |
|
| Dynamic DNS https://forum.linode.com/viewtopic.php?f=19&t=9532 |
Page 1 of 1 |
| Author: | Floating Point [ Wed Nov 07, 2012 4:13 pm ] |
| Post subject: | 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=<API_KEY>&api_action=domain.resource.update&DomainID=<DOMAIN_ID>&ResourceID=<RESOURCE_ID>&Target=<DYNAMIC_IP> 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. |
|
| Author: | caker [ Wed Nov 07, 2012 4:18 pm ] |
| Post subject: | Re: Dynamic DNS |
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 |
|
| Author: | Floating Point [ Wed Nov 07, 2012 4:24 pm ] |
| Post subject: | Re: Dynamic DNS |
Thanks, Chris, that will make my task easier! |
|
| Author: | Floating Point [ Wed Nov 07, 2012 4:41 pm ] |
| Post subject: | Re: Dynamic DNS |
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? |
|
| Author: | caker [ Wed Nov 07, 2012 4:43 pm ] |
| Post subject: | Re: Dynamic DNS |
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 |
|
| Author: | Guspaz [ Wed Nov 07, 2012 6:12 pm ] |
| Post subject: | Re: Dynamic DNS |
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 <?php print $_SERVER['REMOTE_ADDR']; ?> 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. |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|