ddns not updating

matthewk

New Member
Howdy,

This bit of python claims it works but it does not update the dns. I put my username, token, domain name to update, and it's new IP and it does not return any errors.

import requests

# Replace with your info
hostname = "foo.com"
ip_address = "123.123.123.123"
token = "134567890"
username = "itsmedummy"

url = f"https://{username}:{token}@dynamic.zoneedit.com/auth/dynamic.html?host={hostname}&dnsto={ip_address}"

response = requests.get(url)

if response.status_code == 200:
print("DNS updated successfully.")
else:
print(f"Failed to update DNS. Status code: {response.status_code}")
print("Response:", response.text)

###############

I get the 200 return code but it does not update my dns. Also, is there a way to see an update history on your end? I am wondering if that would shed any light on what is going on.

Thank you!
 
Ok, making the script a bit more verbose.... It seems the website is sending back a 200 even though the process is returning a
<ERROR CODE="708" TEXT="Failed Login: my_userid" ZONE="my_domain.com">

I have tried one domain with every token that I have, I had got one per domain before I read on here you just need one. In any case, it does not like any of them and it also does not like my password.

Oddly enough, even though it seems to dislike the token, and gives me a failed login message as above, if I try to update again back to back I get a <ERROR CODE="702" PARAM="600" TEXT="Minimum 600 seconds between requests" ZONE="my_comain.com"> error. This makes me question the login failure message, but to date nothing has changed the IP address.

BTW, are there any guardrails on the IP addresses? For testing I have been trying to change it to 123.123.123.123 which really seems to belong to some entity in China. I can not see how this would have any negative effect on them, and it would only last long enough for me to have nslookup reflect it so I know it is really changed, before switching it back.

Any help is appreciated.
 
I have been plugging away at this. Bit by bit. I got the part of the script written to extract the WAN IP address from my router. That code will probably not be of much use to others as it is hardware specific but for me, it means I can get my WAN IP from both the most trusted source and I know the location of it in the html is not going to change so this should be rock solid unless I get new hardware.

So, from going over every post on this issue I could find in the form, I was able to find two URL's tp try for updating:
url = f"https://{ze_username}:{ze_token}@api.cp.zoneedit.com/dyn/generic.php?hostname={ze_hostname}&myip={ip_address}"

and
url = f"https://{ze_username}:{ze_token}@dynamic.zoneedit.com/auth/dynamic.html?host={ze_hostname}&dnsto={ip_address}"

Nether of them seem to accept my creds.

I have gone back and got rid of two of the tokens I had and got one new one, I have tried that, I have tried my password. No joy.

I saw some info about the TTL so I set that to be 600 seconds, still no joy.

I saw someone else moved from regular DNS to dynDNS and they still had some A records. I verified that I do not. I do have some other records but no A records.

As luck would have it we lost power for a bunch of hours the other night and wound up with yet another new IP address. I had to go in and update it manually.

I think if this issue was more widespread people would be up in arms, the good news is I do not think it is, but I also do not know how many dyndns folks there are out there or how often their ISP's mess with them.

I am open to ideas.
 
Ok thank you Sandy! This one is resolved. It was a really dumb assed error on my part. Perhaps this can help one or more of you to resolve this on your own. My problem was I looked up my username for the site in my chrome PW manager and took it from there. Sadly, I have a different username for the forms and the main site and the one I got back with my quick foray into the password manager was the wrong one. Sadly told me the username was wrong and I was thinking like I cut it from the pass manager, wtf, and looked it up again and this time I noticed I had two different user names and I was using the wrong one. I fixed that and my homebrew code worked just like it should. Yahoo!
 
Back
Top