Any docker recommendations for a utility that can update DNS, based on current external IP?
I’ve used ddclient in the past, but it seems like its not working anymore, oddly.
Inadyn has packages for most unix systems and also a docker package.
What DNS provider does it need to support?
Personally I’d just whip up a quick shell script or use something like Python, it’s probably like 20 lines of code to make the necessary API request and you have much more freedom than some fixed software and fixed features.
Relevant example, with afraid.org you can do it with a wget or curl command.
Actually, right after posting this, I got it to work. It looks like ddclient queries checkip.dyndns.org for IP, and by default using SSL/443. HTTPS isn’t working on checkip.dyndns.org at the moment, so queries were failing. I disabled SSL and it started to work.
I’m using Google Domains. Good suggestion on the API approach though, I’ll consider that for next time it breaks on me.
ddclient supports google domains directly
The main required feature that complicates things a bit is rate limiting since a lot of providers do not appreciate getting lots of update requests to the same IP in a short period of time if you e.g. reboot repeatedly but also will eventually delete names that are never updated.
Ideally you’d check the public ip against the dns resolved ip (without cache) before launching an update and have a timeout (let’s say 30s) after.
What’s your end goal? Have you looked into something like tailscale or cloudflared?
I’m running a few services (publicly accessible media server, a matrix server, etc.). I’m also running some internal services which I VPN for.
For VPN use cases, I’ve considered using Tailscale a bunch of times, and still think about giving it a shot. I’ve always shied away due to the lack of self-hosted-ness, and because the throughput isn’t great. I know that the throughput issue isn’t really an issue since my requirements are low - but still.
For the public services – could Cloudflare help with the dynamic IP issue?
Tailscale isn’t really that slow once you connect it creates direct connections between nodes. There is some latency when you first connect like 100ms before derp lets the nodes directly connect. I get full link level throughput between oci nodes and my house/cellphone. I even went so far as disabling all external ports on my cloud instances.
https://tailscale.com/kb/1094/is-all-traffic-routed-through-tailscale/
Check out this for cloudflare it will mostly allow you to expose a service if you let them manage dns for you. https://developers.cloudflare.com/cloudflare-one/connections/connect-apps
Screenshot of derp making a direct connection…
You can also check your router settings. And if your router can’t do Dynamic DNS, get a better router :p
Maybe something like this? https://github.com/maxkratz/coredns-dyndns