troglobit/inadyn

[Suggestion] Check if domain is still reachable on period

Gontier-Julien opened this issue · 6 comments

That just a suggestion to potentially make the url of the domain always reachable whatever happen if the ip got wiped out from the dynserver or whatever could happen.

How it could work:

When the xx period come to the end, check if the hostname still as an ip associated with it.

If it return an ip that is the same as the current one (unless the current one return nothing)*, don't do anything and restart the period.

If it doesn't return an ip, grab the current one (unless the current one return nothing)* and update it.

*to prevent wiping with nothing the hostname (like ddclient do if it fail to grab an ip)

Why do this?
Reliability and to ensure that the hostname can always be reachable if for example the dyndns server doesn't have it anymore for xx reason.

It may not seem useful at first, but it would be a nice mechanism to have when not home and not being worried to not being able to access it (unless there a power outage or internet one).

Let me know what do you think about it ^^

And inform the user about it even if it all good.

That what inadyn kinda currently do, but only at startup if i'm not mistaken

The period = SEC setting in the .conf file controls this to a certain degree. We cannot really trust DNS¹, due to proxies and caching, so inadyn maintain a local cache of what it last sent to the DDNS provider.
__
¹ the initial DNS check is only done to check the cached value against.

Do you have maybe another idea?

I've tried to stay clear of being dependent on DNS for inadyn. Usually adjusting the period and forced-update time is enough. If the DDNS provider somehow loses the IP address is not something that inadyn can protect against.

However, you can script around this if this is something you feel is a risk worth mitigating. In such an approach you can have inadyn running as a daemon in the background to handle automatic updates, and a periodic script that checks the DNS in parallel, calling inadyn -1 ... should the DNS have lost its value. Trick is to determine if it was a temporary failure, cache miss due to proxy restart, or other problem.

Thank for the info ! Closing this now ^^