Project

General

Profile

Actions

Bug #14276

open

One.com dynamic DNS doesn't work

Added by Alexander Arques about 1 year ago. Updated 6 months ago.

Status:
Pull Request Review
Priority:
Normal
Assignee:
-
Category:
Dynamic DNS
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Default
Affected Version:
2.6.0
Affected Architecture:
All

Description

I registered a domain on One.com yesterday and later found out that the Dynamic DNS updater for it in pfSense doesn't work with it. I'm not sure if it ever worked or if they changed something on their webpage but I managed to fix it either way.

I will attach my first system patch here which solves the issue. I'm not sure it's written in the best way though. I couldn't get it to work with the previous cookie-extractor script, I suspect it might be too basic since it seems to ignore cookie domains, paths and other rules. Therefore I used the CURL cookiejar feature instead.

After fixing the login issue I still wasn't able to update my one.com root domain without modifying the validation rules on the "services_dyndns_edit.php" page to allow a hostname of "@" to signify that I want the root domain record to be updated. I didn't document this but there was no documentation for one.com previously either.

Feel free to clean up my patch in any way you want, I have 0 previous experience with patching pfSense or writing PHP code.

It seems like the ACME package also has a DNS updater for One.com but it also seems broken but I have not yet investigated why. But I suspect it fails to login similarily, but I might investigate that deeper at some point in the future and perhaps create a separate issue for that one later.


Files

one.com-dyndns-patch.diff (4.58 KB) one.com-dyndns-patch.diff Alexander Arques, 04/13/2023 01:21 PM
one.com-dyndns-patch.diff (4.47 KB) one.com-dyndns-patch.diff Removed left over log_error line. Alexander Arques, 04/13/2023 03:25 PM
Actions #1

Updated by Alexander Arques about 1 year ago

By the way there are some more notes about what issues I fixed and how I went about it in this thread but the patch attached here is a bit cleaner than my ramblings there. I no longer have to use the curl_reset($ch) call for example and I now make sure that the temporary cookie file is deleted after the process completes. I realize that the file itself could be considered a bit insecure though since it could somehow increase the risk of the login-session data for one.com to leak.

https://forum.netgate.com/topic/124904/dynamic-dns-one-com/33

Actions #2

Updated by Jim Pingle about 1 year ago

Can you submit that change as a pull request on Github?

https://docs.netgate.com/pfsense/en/latest/development/pull-request.html

Actions #3

Updated by Alexander Arques about 1 year ago

Sure, pull request has been created here now: https://github.com/pfsense/pfsense/pull/4632

While creating it I noticed a log_error()-line which was just there for debugging purposes and wasn't supposed to be in the final patch. So if someone prefers the patch file I'm also attaching another one here without that line. I'm not sure how to best debug pfSense code or how logging works so while developing I just put a lot of log_error lines everywhere since that is similar code I saw nearby...

The patch files apply cleanly on my 2.6.0 system with patch strip count: "1", base directory "/" and "Ignore whitespace in the patch."
Pull request was created from a fork from master and applies to master.

Actions #4

Updated by Marcos M 6 months ago

  • Status changed from New to Pull Request Review
Actions

Also available in: Atom PDF