Project

General

Profile

Actions

Bug #10196

closed

Cloudflare dyndns not working (Invalid TTL)

Added by László Dobó about 4 years ago. Updated about 4 years ago.

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

100%

Estimated time:
Plus Target Version:
Release Notes:
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.


Files

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
Actions #2

Updated by János K about 4 years 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.

Actions #3

Updated by László Dobó about 4 years 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.

Actions #4

Updated by Jim Pingle about 4 years 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.

Actions #5

Updated by Jim Pingle about 4 years ago

  • File cf-ttl.diff added

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

Actions #6

Updated by Jim Pingle about 4 years ago

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

Updated by Jim Pingle about 4 years ago

  • File deleted (cf-ttl.diff)
Actions #8

Updated by Jim Pingle about 4 years ago

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

Actions #9

Updated by János K about 4 years ago

Correct, working!

Actions #10

Updated by László Dobó about 4 years ago

It's working for me as well!

Actions #11

Updated by Jim Pingle about 4 years ago

  • Status changed from Feedback to Resolved

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

Actions

Also available in: Atom PDF