Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloudflare DDNS not retrieving Zone ID #926

Closed
jslay88 opened this issue Oct 20, 2018 · 2 comments · Fixed by #1072
Closed

Cloudflare DDNS not retrieving Zone ID #926

jslay88 opened this issue Oct 20, 2018 · 2 comments · Fixed by #1072

Comments

@jslay88
Copy link

jslay88 commented Oct 20, 2018

I have looked at the dyndns plugin code, and validated the logic and sequence using postman to hit the api manually, and can clearly see valid responses from the CloudFlare API as the first result returned (I only have one domain on this CloudFlare account, and its the root record I am trying to update here).

For some reason though, the DDNS service refuses to be able to parse it out and fails to update the record.

Here are the logs (reverse order) with the domain name and IP address redacted. But both domain and IP that appear in logs are correct.

Oct 19 22:54:01 | opnsense: /usr/local/etc/rc.dyndns: Dynamic DNS (example.net): ERROR - Zone ID was not found.
-- | --
Oct 19 22:54:01 | opnsense: /usr/local/etc/rc.dyndns: Dynamic DNS (example.net): Current Service: cloudflare
Oct 19 22:54:01 | opnsense: /usr/local/etc/rc.dyndns: Dynamic DNS (example.net): _checkStatus() starting.
Oct 19 22:54:00 | opnsense: /usr/local/etc/rc.dyndns: Dynamic DNS (example.net via CloudFlare): _update() starting.
Oct 19 22:54:00 | opnsense: /usr/local/etc/rc.dyndns: Dynamic DNS (example.net): running get_failover_interface for opt1. found pppoe0
Oct 19 22:54:00 | opnsense: /usr/local/etc/rc.dyndns: Dynamic DNS (example.net): xxx.xxx.xxx.xxx extracted
Oct 19 22:53:59 | opnsense: /usr/local/etc/rc.dyndns: Dynamic DNS: updatedns() starting

What am I missing? Is there any way to get an even more verbose output to the log outside of enabling Verbose Output on the DDNS config?

@fichtner
Copy link
Member

fichtner commented Oct 25, 2018

#861

Temporary workaround:

# opnsense-revert -r 18.7.4 os-dyndns

@finish06
Copy link

I am experiencing this issue. Let me know how I can assist with testing if needed.

fichtner pushed a commit that referenced this issue Dec 17, 2018
When refactoring the Cloudflare DDNS code, I removed a bunch of assumptions
but inadvertently added one. The refactored code did not allow for "apex"
domain records, records for which there is no hostname, just the bare
domain. (Traditionally, these have been referred to as '@' records but
with the Cloudflare API, you just hand it the name of the zone.)

Ideally there would be a checkbox or something in the UI for this, or
even better a way to specify the record and zone separately but in lieu of
that, we first try to break the provided string down into hostname and
domain portions and look up the zoneId from that. If that fails, we try
to look up the zondId using the whole string. And then finally fail if
neither return a zone from the API.

Hopefully fixes #926 and possibly the issue reported in PR #861.
fichtner pushed a commit that referenced this issue Dec 24, 2018
When refactoring the Cloudflare DDNS code, I removed a bunch of assumptions
but inadvertently added one. The refactored code did not allow for "apex"
domain records, records for which there is no hostname, just the bare
domain. (Traditionally, these have been referred to as '@' records but
with the Cloudflare API, you just hand it the name of the zone.)

Ideally there would be a checkbox or something in the UI for this, or
even better a way to specify the record and zone separately but in lieu of
that, we first try to break the provided string down into hostname and
domain portions and look up the zoneId from that. If that fails, we try
to look up the zondId using the whole string. And then finally fail if
neither return a zone from the API.

Hopefully fixes #926 and possibly the issue reported in PR #861.

(cherry picked from commit 2b4f2c8)
(cherry picked from commit ddb72d9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants