I set up a dedyn.io Domain. I update its IPs via a script every 5 minutes.
I’ve read here that communicating empty/faulty string instead of a valid IP can lead to deletion of an A record. So I adapted my script to only send out updates when it is a confirmed IP.
(I check with regex ^([0-9]{1,3}.){3}[0-9]{1,3}$)
However, my A record still disappears after an update. What else could go wrong here?
You should only update when the IP changes. Always sending the update request places unnecessary load on the deSEC servers.
Not enough information to tell. I suggest you modify your script to log the complete URLs it is calling right next to the actual curl or wget call and verify that they look like you are expecting them to.
That’s what I do. I run the script every 5 minutes and it updates when my IP changes.
Is it possible that I have to update both IPv6 and IPv4 in one request in order to avoid record corruption?
So this: https://update.dedyn.io/?hostname=${HOSTNAME}&myipv4=${IPV4}&myipv6=${IPV6}``" \ --header "Authorization: Token ${TOKEN}")
You could work with the “preserve” parameter.
However, your A record disappearing is probably another issue, and just setting it to preserve will not delete an A or AAAA record even if an IP disappears.
Here is a shamless plug for shell script. It only does an update if it detected an actual change and it uses a backup url to query your IP if it did not detect it in the first go.