Hacker News new | ask | show | jobs
by riobard 695 days ago
There's one gotcha tho.

For Dynamic DNS you want minimal TTL, ideally less than 60 seconds, otherwise the DNS records will be cached and will not reflect the correct address during the short period of time window it changes.

Dedicated DDNS services usually have very short TTL (some offering as low as 5 seconds IIRC), but free Cloudflare accounts have a minimal TTL of 300 seconds (5 minutes), coupled with the crontab running every 5 minutes, your endpoint could be out of contact for 10 minutes if everything aligns right.

2 comments

Then run the cron every minute. As you can see with his example, it doesn't even run every 5 mins.

For unproxied records you can set the TTL to 1 minute as per their documentation..

And normally your IP would change only when reconnecting, so it's not a big deal...

Another issue is a lot of ISPs will ignore your TTL and cache it for hours or more on their internal resolvers