ddns: failing for cloudflare proxied DNS
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
Maintainer: @paper42
Environment: OpenWRT 22.02, Cloudflare Proxied DNS
Description: When using ddns-scripts to update a Cloudflare Proxied DNS record, it will successfully update the DNS record's IP address but because it is proxied, the public DNS record actually points to a Cloudflare-provided IP address. Because the DDNS Update Script checks against the DNS record to make sure it was successful, it sees the different IP address compared to what it thinks it should be and reports the update has failed, triggering it to retry again.
Perhaps an option to disable the post-update check?
205807 : Detect local IP on 'network'
205808 : Local IP '51.***.***.***' detected on network 'wan'
205808 : Update needed - L: '51.***.***.***' <> R: '104.***.***.***'
205808 : parsing script '/usr/lib/ddns/update_cloudflare_com_v4.sh'
205808 : Found Username 'Bearer' using Password as Bearer Authorization Token
205808 : #> /usr/bin/curl -RsS -o /var/run/ddns/myddns_ipv4.dat --stderr /var/run/ddns/myddns_ipv4.err --noproxy '*' --header 'Authorization: Bearer ***PW***' --header 'Content-Type: application/json' --request GET 'https://api.cloudflare.com/client/v4/zones?name=my.TLD'
205809 : #> /usr/bin/curl -RsS -o /var/run/ddns/myddns_ipv4.dat --stderr /var/run/ddns/myddns_ipv4.err --noproxy '*' --header 'Authorization: Bearer ***PW***' --header 'Content-Type: application/json' --request GET 'https://api.cloudflare.com/client/v4/zones/***/dns_records?name=my.TLD&type=A'
205811 : IPv4 at CloudFlare.com already up to date
205811 info : Update successful - IP '51.***.***.***' send
205811 info : Forced update successful - IP: '51.***.***.***' send
205811 : Waiting 600 seconds (Check Interval)
210811 : Detect registered/public IP
210811 : #> /usr/bin/host -t A my.TLD >/var/run/ddns/myddns_ipv4.dat 2>/var/run/ddns/myddns_ipv4.err
210812 : Registered IP '104.***.***.***' detected
210812 WARN : Updating IP at DDNS provider failed - starting retry 31/0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ddns-scripts Cloudflare path, especially /usr/lib/ddns/update_cloudflare_com_v4.sh, and reproduce the behavior using a proxied Cloudflare DNS record. Trace the post-update comparison shown in the logs and determine how completion should be recognized when the public record returns a Cloudflare IP. Done means the successful provider update no longer triggers repeated retries in this environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100