mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-05-28 02:41:55 -04:00
FEATURE REQUEST: add dyndns.org/dyn.com support #28
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bcurran3 on GitHub (May 7, 2020).
I like your web interface. Would love to switch to this container but I use dyndns.org (now dyn.com).
Hopefully you can add support.
TIA.
@github-actions[bot] commented on GitHub (May 7, 2020):
Thanks for creating your first issue 👍 Feel free to use Slack if you just need some quick help or want to chat
@qdm12 commented on GitHub (May 7, 2020):
I'll try adding it this evening (EST) / tomorrow 😉
@qdm12 commented on GitHub (May 8, 2020):
I'm still working on it, their api is a bit more convoluted than I expected, so it might take a few more days; I'll keep you updated.
@bcurran3 commented on GitHub (May 9, 2020):
Quentin,
Take your time. You owe me nothing.
Greatly appreciate any and all efforts you do.
Would examples help? This is what I'm currently using (for like 3 days):
https://github.com/theonemule/docker-dynamic-dns
This is the "standard" linux updater for it that's been around a while and available via apt.
https://help.dyn.com/ddclient/
@qdm12 commented on GitHub (May 10, 2020):
No problem 😉 But as 'advertised' I'm happy to add a DNS provider if anyone needs one, it's relatively easy usually. In the end the script you sent greatly simplified things. DynDNS' API is very capable but there is a lot of ways to do the same thing 😄 And that was much easier.
I opened a pull request for it, although I would your help a bit. Can you run and send me back the output from the following commands?
Put in your username and password and use a garbage hostname you don't own
Enter your username with a wrong password
The successful situation, with your username+password and a domain you own (or subdomain.domain.com)
So that the program can give meaningful errors or know when the update was successful.
Thanks!
@bcurran3 commented on GitHub (May 10, 2020):
Happy too. Might do late tonight but more likely tomorrow. Will update soon as I can.
@bcurran3 commented on GitHub (May 11, 2020):
Here ya go...
@qdm12 commented on GitHub (May 11, 2020):
Wait 3 should be successful, what's the message sent back once it succeeds? Otherwise, thanks I've updated the cases, should be merged as soon as I get this last case 😉
@bcurran3 commented on GitHub (May 12, 2020):
It didn't succeed. When I had all the right credentials, I got "badrequest." :(
@qdm12 commented on GitHub (May 12, 2020):
Ah that's problematic. And does it work with:
Note that this will set your domain ip to 127.0.0.1 (so nothing really) until you change it back, if it works. You could also check on dyndns if the ip changes to 127.0.0.1. Finally, I think you could also try these urls in a browser if that's easier for you.
@bcurran3 commented on GitHub (May 12, 2020):
Doing it's easy, no worries.
Result this time is:
Hope that's good!
@qdm12 commented on GitHub (May 12, 2020):
Did it update your A record to 127.0.0.1?
no idea what that 6789 is 😆
Using the shell script based container you mentioned, do you get any output in your logs?
@bcurran3 commented on GitHub (May 13, 2020):
Sorry, I never logged in to verify it changed. :)
I just logged in, looked at the current correct IP, ran the last request 5 times and got :
[2] 8622
[3] 9163
[4] 9458
[5] 9621
[6] 12494
[7] 13207
On the last try, I changed the IP to 1.2.3.4, but the IP never changed online at dyndns.org.
@qdm12 commented on GitHub (May 13, 2020):
Actually I found all the possible return codes although none of them correspond to these strange numbers. If you were using that other container you mentioned, do you get anything in the logs about it? (i. e.
nochgorgood)Anyway, there is a part worrying me from their documentation:
I will first refactor the code such that it only updates DNS records once your public IP changes. For now it forces the update on all DNS providers every 5 minutes no matter what, and this approach might lead you to being blocked with dyndns.
@bcurran3 commented on GitHub (May 21, 2020):
No, blaize/docker-dynamic-dns:latest doesn't appear to have any logging.
Yes, Dyn.com/dyndns.org doesn't like repetitive updates. They really one want new information, not confirmation of old information. So updating only when there is a change detected is really the key to success though I'm sure they'd allow less frequent nochg "updates".. Daily? Weekly? HIIK!
I'm guessing you do logging, so I'm going to install and spin up your container today.
@bcurran3 commented on GitHub (May 21, 2020):
UPDATE: I now have the container officially installed and I can do any testing you might like via it.
I pulled the v2 image for testing but looks like it doesn't have a "dyn" or "dyndns" provider setup yet. :(
EDIT: Just switched back to latest. For whatever reason I can't access the web interface, "ERR_CONNECTION_REFUSED" :( Maybe because I don't have a valid config...
@qdm12 commented on GitHub (May 24, 2020):
Hello again, thanks for all your issues, I'm working on them.
I'm going through a rather huge refactor to support ipv6, only one ip query for all records, only query APIs when the ip changes, etc. etc. (spent like 6 hours today already!), so it might take a bit more time sorry about that 😉 I'll report back once I can finally move on the refactoring
@bcurran3 commented on GitHub (May 24, 2020):
Appreciate your efforts Quentin. Please, don't feel any pressure from me. Take your time.
@qdm12 commented on GitHub (May 30, 2020):
Hello, I'm finally done with a huge refactor to call the DNS API only when the public ip address changes and not every 5 minutes 😉
So I updated the pull request for dyndns, would you mind trying with the Docker image
qmcgaw/ddns-updater:dyn, the documentation is here, where you essentially need for dyndns:user,password,hostandip_version.The container is using the same https://user:password@members.dyndns.org/v3/update endpoint, so I'm not sure what it will spit out on update, but let's see!
@bcurran3 commented on GitHub (Jul 18, 2020):
I'm back!
I did the following:
Edited my config.json to this:
I pulled down qmcgaw/ddns-updater:dyn and ran it.
Logs are showing me this:
...and for some reason I've never been able to see the web page. I go to 192.168.x.x/:8001 (port I have assigned) as well as 192.168.x.x/updater:8001. I get a connection refused on the former and a 404 on the latter.
@qdm12 commented on GitHub (Jul 19, 2020):
Glad you're back! Try with provider
"dyn"instead, sorry I forgot to document it in the readme. I'm 100% not sure it will work out of the box though, but we can give it a try. I'll dig into it if it doesn't work 😉 You should also repull the image (a lot of changes merged from :latest to :dyn and wait for the build to be done too)@bcurran3 commented on GitHub (Aug 1, 2020):
Tried again. Frustrated.
I'm using the latest :dyn image.
a made a data/config.json with
log gives me:
2020-08-01T05:21:23.358-0700 ERROR username cannot be empty {"node_id": 0}
I tried adding "note_id":0" at the end of the mix, I think I got the same result. (It's back out now.)
Still getting ERR_CONNECTION_REFUSED when trying to go the web interface. http://IP:port or 404 when http://ip/admin:port
:(
EDIT: Changed user to my account name instead of my e-mail address, all same results afterward.
@qdm12 commented on GitHub (Aug 2, 2020):
Hello, sorry the documentation was wrong, it's
usernameinstead ofuser.For the node_id logged, it's just in case you run multiple instances of the container. It shouldn't be shown anymore (
NODE_ID=-1to disable it which is the default).@bcurran3 commented on GitHub (Aug 3, 2020):
Success!
That was the problem. Now I even have a status web page too. 👍
Guess I'm going to have to open another issue suggesting that the web server run and display some sort of invalid config.json message on error instead of just aborting. :)
@qdm12 commented on GitHub (Aug 3, 2020):
Yes, I still need to do a proper frontend which should solve most of the current limitations. Unfortunately, I'm low on time currently but I still have that in my mind, it will come out one day 😉
@qdm12 commented on GitHub (Aug 3, 2020):
So it works for dyndns? Have you tried setting the A record to 127.0.0.1 and then running the container to make sure it updates the record? It has been a while so I'm surprised it works out of the box so well haha
@bcurran3 commented on GitHub (Aug 11, 2020):
Nope. I did not try to manually set the IP. I think I tried before and the site will only fill in the IP you're accessing from. So I guess I should do via a VPN if it's not blocked. Can try that in the future.
IP changed last night.
dyndns didn't get updated. :(
Log: (edited)
@bcurran3 commented on GitHub (Aug 11, 2020):
p.s. get "404 page not found" when trying to access the history site... anxiously awaiting the proper front end. :)
@qdm12 commented on GitHub (Aug 11, 2020):
Yes it crashed, I'll go through the code tonight.
To test it you can send an http request with curl or postman to force your IP to 127.0.0.1 and then run the container. Let me know if you need help for the curl command.
@bcurran3 commented on GitHub (Aug 11, 2020):
I need help with the curl command.
EDIT: BUT at present I don't need to force it to a fake IP as the IP has changed but not updated. :)
@qdm12 commented on GitHub (Aug 11, 2020):
But no point retrying yet, the code needs a fix first. I think it detected your IP changed but crashed when trying to update it.
EDIT: I'll write you that command tonight once I fixed my bad code
@bcurran3 commented on GitHub (Aug 11, 2020):
You're too damn nice/humble. Thanks!
EDIT: I don't necessarily need to access anything remotely today, so I'm going to hold of on updating the ddns in hopes that you're magic can do it tonight.
@qdm12 commented on GitHub (Aug 11, 2020):
I fixed the program.
Although before running the container please try:
Where you need to replace
username,passwordanddomain.comwith your values.That's the same request the ddns-updater does so it would be easier to see if it works. If you can see the domain ip has been changed to 127.0.0.1, then the container should work.
EDIT 1: And thanks for the compliment 👍 You deserve all of it, with the time spent debugging issues 😄
EDIT 2: FYI the container forces the updates at start (always) and then only updates DNS records once your IP address changes.
@bcurran3 commented on GitHub (Aug 15, 2020):
Had problems running the docker command, possibly just impatience on my part....
I ran the wget command from command line on my local Windows box and it came back with a response "good 127.0.0.1." Also verified successful update at dyn.com with 127.0.0.1.
YAY! Looks like we may be able to put this one to bed.
@bcurran3 commented on GitHub (Aug 15, 2020):
Just re-started the container and dyn.org was successfully updated with my real and current ip as well.
@bcurran3 commented on GitHub (Aug 15, 2020):
ALMOST there.
Your status web page isn't coming up (404). I THINK maybe you're not processing the return string from dyn.com the right way yet.
LOGS:
@qdm12 commented on GitHub (Aug 15, 2020):
Indeed, it was looking for a
successbut it is actually agoodprefix we were looking for! I fixed it with the commit mentioned above, you probably can re-pull and re-try now. On the other hand, I think it should show the status web page even on failure, as long as you have one valid setting.What's your Docker run command / docker-compose / other? Maybe I can help.
@bcurran3 commented on GitHub (Aug 16, 2020):
NOTE: I am still getting:
2020-08-16T14:40:17.278-0700 WARN unhealthy: lookup IP addresses for xxxxx.dyndns.org are x.x.x.84 instead of x.x.x.174 {"node_id": 0}Former is current IP, latter is previous IP. For some reason my container status is "unhealthy."
Should I still be using :dyn or have switched to :latest?
Using Ansible:
@qdm12 commented on GitHub (Aug 17, 2020):
Still use
:dyn.Might be because it takes some time for the IP address to be propagated. Check with
nslookup yourdomain.com. Let me know if it works for you and I'll merge it to:latest. Thanks!@bcurran3 commented on GitHub (Aug 19, 2020):
I don't think that's the issue as my IP changed over a week ago and should have propagated even to the slowest 300 baud bound DNS servers by now. (Not sure if IP via carrier pigeon has ever actually been setup for testing.) Updates for myself via 1.1.1.1 propagate in well under an hour.
I did a NSLOOKUP, it hit my local non-authoritative DNS server which goes upstream to my currently off PiHole and then up to 1.1.1.1 and came back with a 3rd IP address x.x.x.105! So the mystery thickens. (This was done on my Wintel box, not via the container.)
I just checked dyn.org and it shows the current IP.
EDIT: Went to https://centralops.net/co/ as well as http://www.kloth.net/services/nslookup.php and looked up the host, both reported the correct IP address as well.
EDIT2: Flushed the cache on my DNS server and my local Wintel box and nslookup still reports back x.x.x.105 which REALLY throws me!
@qdm12 commented on GitHub (Aug 19, 2020):
Haha DNS is FuN... Well the container uses whatever dns you have configured in your network. Try running the container setting the dns to 1.1.1.1 (for Docker run its with
--dns 1.1.1.1not sure for ansible).@bcurran3 commented on GitHub (Aug 19, 2020):
But my container is one step removed from 1.1.1.1. It gets it's DNS from my local DNS which then goes upstream to 1.1.1.1. But for the same of compliance... I added dns_servers: "1.1.1.1" to the config.
End result is the same - unhealthy container and the same warning:
An oopsie on my part - the webpage IS running. There was (is) a problem accessing it via hostname using Traefik, but when I go to IP:port it works fine. Sorry for the confusion!
@bcurran3 commented on GitHub (Aug 19, 2020):
Maybe this helps:
My updates.json file has the x.x.x.174 IP in it and a 08/03/20 timestamp.
permissions are 777 so that shouldn't be the issue.
Delete it? Fudge it?
@qdm12 commented on GitHub (Aug 19, 2020):
Uhhh not sure 😄 Where does it get the .84 address from though? You can try removing it, let me know if it solves it and I'll dig into fixing it permanently. Anyway, for now I'll merge
:dyninto:latest. But let's continue the conversation on the closed issue.@bcurran3 commented on GitHub (Aug 19, 2020):
.84 is the current IP
@bcurran3 commented on GitHub (Aug 19, 2020):
I just renamed the upates.json and restarted the container.
A new updates.json was created with current info.
Container is healthy with no warnings.
Seems the root cause is the updates.json file was never updated correctly with the most recent info.
@qdm12 commented on GitHub (Aug 19, 2020):
Uh ok, I'll check the code, probably add some long overdued tests. Thanks for the debugging and enjoy 😉 (finally!)
@bcurran3 commented on GitHub (Aug 19, 2020):
@bfincher commented on GitHub (Jan 15, 2022):
I'm having a similar problem as the original issue author. My config.json is:
I am getting "ERROR bad request sent" when running the container. Any ideas?
@MichaelMichaelMichaelMichaelMichael commented on GitHub (Sep 11, 2022):
Hi, I'm having the same issue:
using this config:
I would appreciate any advice.
@heikkiheer commented on GitHub (Mar 10, 2023):
First: Super thanks for your work! It works fine here. I run it in a k3s cluster. As reference for anyone who needs it (please note that the code below is a yaml and I hope that my copy/pasteing did not change the damn spaces necessary in a yaml file). The ingress is a to-do on my never ending to-do-list and it is wrong but does not affect the functionality.
@qdm12 commented on GitHub (Jun 12, 2023):
@bfincher @MichaelMichaelMichaelMichaelMichael please report to issue #401 I am waiting for someone to figure this out with their dyn account, since from their API documentation the current implementation seems to be correct.
@bcurran3 commented on GitHub (Jun 12, 2023):
Just a FYI: I'd love to help, but I migrated from dyn to Cloudflare last year.