Project

General

Profile

Bug #10196

Cloudflare dyndns not working (Invalid TTL)

Added by László Dobó 8 months ago. Updated 8 months ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
Dynamic DNS
Target version:
Start date:
01/21/2020
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.3.4
Affected Architecture:
All

Description

Cloudflare DynDNS was working fine until today. I think that Cloudflare changed their API and because of that, the dynamic DNS client in pfSense is no longer working.

Relevant system log entry:

/rc.newwanip: phpDynDNS (ak2): UNKNOWN ERROR - Invalid TTL. Must be between 120 and 2,147,483,647 seconds, or 1 for automatic

You cannot set TTL on the dashboard right now. I checked the master branch of pfSense on GitHub and there is no TTL option for it either.

Screenshot_20200121_092140.png (139 KB) Screenshot_20200121_092140.png Screenshot László Dobó, 01/21/2020 02:21 AM
fix.png (137 KB) fix.png Screenshot János K, 01/21/2020 05:47 AM
dyndns.class.fix.txt (92.6 KB) dyndns.class.fix.txt Edited file János K, 01/21/2020 05:48 AM
cf-ttl.diff (1.09 KB) cf-ttl.diff Jim Pingle, 01/21/2020 07:58 AM

Associated revisions

Revision 9404b54a (diff)
Added by Jim Pingle 8 months ago

Add TTL for CloudFlare DDNS. Fixes #10196

Revision ce1b0326 (diff)
Added by Jim Pingle 8 months ago

Add TTL for CloudFlare DDNS. Fixes #10196

(cherry picked from commit 9404b54a44a820b9c0332149a6ea794eed54bdac)

Revision e9869c5a (diff)
Added by Jim Pingle 8 months ago

CF DDNS wants int for TTL. Issue #10196

Revision 8d9e01ab (diff)
Added by Jim Pingle 8 months ago

CF DDNS wants int for TTL. Issue #10196

(cherry picked from commit e9869c5abc70dc4aa7cd27d2a139696a1970903f)

History

#2 Updated by János K 8 months ago

László Dobó wrote:

Cloudflare DynDNS was working fine until today. I think that Cloudflare changed their API and because of that, the dynamic DNS client in pfSense is no longer working.

Relevant system log entry:

[...]

You cannot set TTL on the dashboard right now. I checked the master branch of pfSense on GitHub and there is no TTL option for it either.

Hi,

I edited /etc/inc/dyndns.class file and DDNS Updater is working again. (https://stackoverflow.com/a/54454832)
I'm removed braces "{ }" and added new line "ttl => 1". See attachment image.

I hope soon to be officially corrected.

#3 Updated by László Dobó 8 months ago

János K wrote:

László Dobó wrote:

Cloudflare DynDNS was working fine until today. I think that Cloudflare changed their API and because of that, the dynamic DNS client in pfSense is no longer working.

Relevant system log entry:

[...]

You cannot set TTL on the dashboard right now. I checked the master branch of pfSense on GitHub and there is no TTL option for it either.

Hi,

I edited /etc/inc/dyndns.class file and DDNS Updater is working again. (https://stackoverflow.com/a/54454832)
I'm removed braces "{ }" and added new line "ttl => 1". See attachment image.

I hope soon to be officially corrected.

Thank you for your help! I successfully applied the same fix just before submitting this issue and can confirm that it works just fine. Nonetheless, I think that implementing an official fix is highly recommended. Currently, I don't have the time myself but hope somebody can fix this in the future.

#4 Updated by Jim Pingle 8 months ago

  • Status changed from New to In Progress
  • Assignee set to Jim Pingle
  • Priority changed from Normal to High
  • Target version set to 2.4.5

What exact set of {} did you remove? I do not see any in the cloudflare query setup that look like they should be removed. The braces around variable names are there so that PHP will properly replace them in strings. Though it doesn't look like the braces or quotes should be necessary since they only surround the variable itself.

From what I can see it just needs the TTL parameter added into the $hostData array around line 818 ( source:src/etc/inc/dyndns.class#L818 ) and the TTL field enabled in the GUI. The TTL could default to 1 but the user should be able to override that.

#5 Updated by Jim Pingle 8 months ago

  • File cf-ttl.diff added

Try applying the change in the attached diff and see if it works for you.

#6 Updated by Jim Pingle 8 months ago

  • Status changed from In Progress to Feedback
  • % Done changed from 0 to 100

#7 Updated by Jim Pingle 8 months ago

  • File deleted (cf-ttl.diff)

#8 Updated by Jim Pingle 8 months ago

Fixed diff (CF wants TTL to be an integer type).

#9 Updated by János K 8 months ago

Correct, working!

#10 Updated by László Dobó 8 months ago

It's working for me as well!

#11 Updated by Jim Pingle 8 months ago

  • Status changed from Feedback to Resolved

Code is present in current snapshots, marking this as resolved.

Also available in: Atom PDF