Rapidly changing IP address?

I have a machine that it on an ISP that changes the IP address quite often. Recently times per hour.
DynDNS API on desec.io is rate limited.
What are good solutions to handle such scenarios?

I have thought about creating a cron job runnning every minute on the machine posting its IP address to some service. But then I need to both mange that cronjob as well as develop, deploy, maintain and host the service to which I post this.
And I also need to some way to actually allowing my service to resolve the names based on the info stored in the service…

Your questions seem a bit confused. Maybe the following will help?

You have not stated any quantifier. So what does that mean?

If it is more than 60 times an hour (more than once per minute) then DDNS will not help you. Most DDNS services including deSEC use a minimum TTL of ≥60 seconds. So when the IP(s) change there is probably a slight delay to when DDNS is updated and then it can take up to 60s for the DNS caches to get the new IP(s). The change frequency should probably be less than once every 5 minutes to be somewhat useable.

Here are some typical guesstimates for the delays:

  1. The IP changes.
  2. [+0-60s] The change is detected by the DDNS client. (When this happens depends on how the client works. A cron job running every minute has a worst-case delay of 60s, while a router can probably trigger the built-in client immediately after the the IP changes.)
  3. [+0-≈5s] The DDNS service is updated. (Resolve the hostname of the DDNS service, send the request, process the request on the DDNS service. Note that the last step may take longer if multiple DNS servers need to be synchronised.)
  4. [+0-60s] The DNS caches time out and get the new IP. (DNS TTL.)

If it is a few times an hour, DDNS will work but you might start looking for a better ISP. Changing the IPs more than once per day on a regular basis is very unusual. Though a higher frequency might happen temporarily due to e.g. power outages or other technical issues.

Nothing special here. Dynamic IPs are what DDNS is used for. But what is best for you depends on many things. The easiest is the built-in DDNS support most routers have. But you can also use software such as ddclient or even your own shell script started by cron.

While you could do that, the server part is what deSEC DDNS does already. You only need a client that detects changes of the IP(s) and calls the deSEC Update API when a change is detected. Managing a cron job is not much work. Set it up and then watch it run as configured.

That is commonly what DNS does. But maybe I misunderstood what you want?

You do need to make sure that the service running on a connection with dynamic IPs is LISTENing on the new public IP when it changes. The details on how to do this vary depending on your OS, the service, potentially your router, etc.

For example: If you are using IPv4 and your router uses NAT to enable a single public IPv4 address to be used by multiple hosts on the LAN then the router probably has a port forwarding feature which will allow incoming request to your public IPv4 address and a specific port to be forwarded to a private LAN IP and port. So your service does not have to do anything when the public IP changes because the router will handle that.

But if you are using IPv6 then your LAN host will have at least one public IPv6 address and your service will need to react to changes of that address. And to make matters worse, the public IPv6 address of your LAN client is probably not the same as the public IPv6 address of your router. So in this case your LAN client will need to detect the changes, update DDNS and reconfigure the service.


Thanks for your response.

I was in contact with the ISP. The rapidly changing IP address was due to an error on their side which has now been fixed. DDNS also works fine after this.