Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
17.7 Legacy Series
»
[SOLVED] Dyndns for provider Loopia broken
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Dyndns for provider Loopia broken (Read 5711 times)
magnust
Jr. Member
Posts: 69
Karma: 4
[SOLVED] Dyndns for provider Loopia broken
«
on:
November 15, 2017, 12:52:05 pm »
Hi all!
I'm a long time user of pfsense now switching over to opnsense.
The service "loopia" in dyndns is not handling wildcards properly which makes the call to update the ip instead ending up erasing the CNAME in loopias end rendering our web site unreachable.
Here's the code AFAIK in /usr/local/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc
case 'loopia':
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser.':'.$this->_dnsPass);
curl_setopt($ch, CURLOPT_URL, '
https://dns.loopia.se/XDynDNSServer/XDynDNS.php?hostname=
'.$this->_dnsHost.'&myip='.$this->_dnsIP);
break;
As you can see it doesn't even check the wildcard setting.
An important note: This functionality is broken in pfsense since many years back but due to a different problem in that code. More info here
https://forum.pfsense.org/index.php?topic=138826
What is the best way to get this into a todo fix list?
PS: I can't find any way to edit files from the web GUI, am I blind or is there no such option?
«
Last Edit: November 22, 2017, 06:06:28 am by franco
»
Logged
franco
Administrator
Hero Member
Posts: 17210
Karma: 1566
Re: BUG: Dyndns for provider Loopia broken
«
Reply #1 on:
November 15, 2017, 01:26:50 pm »
Hi Magnust,
There is no file editor on the GUI, only able to change files from the console or SSH.
Typically, broken or new dyndns, I ask for a test account access to fix the issue(s) or others provide patches themselves via GitHub, whatever works best. In one instance we did this for 2 Chinese providers. It was fun to get those working without being able to understand any of their documentation.
In any case, very willing to look at it. For account details, just message me via PM.
Cheers,
Franco
Logged
magnust
Jr. Member
Posts: 69
Karma: 4
Re: BUG: Dyndns for provider Loopia broken
«
Reply #2 on:
November 16, 2017, 02:58:45 pm »
Hey, great if it could be added/changed to this. This code is tested and works fine with Loopia and wildcard on or off:
case 'loopia':
if (isset($this->_dnsWildcard) && $this->_dnsWildcard == TRUE) $this->_dnsWildcard = "ON"; else $this->_dnsWildcard = "OFF";
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser.':'.$this->_dnsPass);
curl_setopt($ch, CURLOPT_URL, '
https://dns.loopia.se/XDynDNSServer/XDynDNS.php?hostname=
'.$this->_dnsHost.'&myip='.$this->_dnsIP . '&wildcard='.$this->_dnsWildcard);
break;
Note! This commonly used line below should not be used, it's been tested and does NOT work:
if (isset($this->_dnsWildcard) && $this->_dnsWildcard != "OFF") $this->_dnsWildcard = "ON";
This line is tested and DOES work:
if (isset($this->_dnsWildcard) && $this->_dnsWildcard == TRUE) $this->_dnsWildcard = "ON"; else $this->_dnsWildcard = "OFF";
More on this issue if interested found here:
https://forum.pfsense.org/index.php?topic=138826
Thanks!!!
PS:
Here's how Loopia REALLY wants us to update their DynDNS:
https://support.loopia.se/wp-content/uploads/2017/02/dyndns_loopia.py_.txt
Logged
franco
Administrator
Hero Member
Posts: 17210
Karma: 1566
Re: BUG: Dyndns for provider Loopia broken
«
Reply #3 on:
November 20, 2017, 06:32:24 am »
Can you try this patch?
https://github.com/opnsense/plugins/commit/8b663af
Apply from the console with:
# opnsense-patch -c plugins 8b663af
Cheers,
Franco
Logged
magnust
Jr. Member
Posts: 69
Karma: 4
Re: BUG: Dyndns for provider Loopia broken
«
Reply #4 on:
November 21, 2017, 05:45:36 pm »
Works like a charm. Tried with both wildcard on and off and everything updates as it should. Beatiful!
Thank you!!!
Logged
franco
Administrator
Hero Member
Posts: 17210
Karma: 1566
Re: BUG: Dyndns for provider Loopia broken
«
Reply #5 on:
November 22, 2017, 06:06:13 am »
Hi magnust,
The update is not in 17.7.8 today, but will follow in 17.7.9, so you may need to apply the patch manually again.
Thank you for the report and testing!
Cheers,
Franco
Logged
magnust
Jr. Member
Posts: 69
Karma: 4
Re: [SOLVED] Dyndns for provider Loopia broken
«
Reply #6 on:
November 22, 2017, 08:15:06 am »
Thanks for the heads up on 17.7.8 and 9
Logged
franco
Administrator
Hero Member
Posts: 17210
Karma: 1566
Re: [SOLVED] Dyndns for provider Loopia broken
«
Reply #7 on:
November 22, 2017, 01:32:42 pm »
FWIW, your modifications will not be overwritten by the 17.7.8 upgrade. I tested this to make sure.
Cheers,
Franco
Logged
magnust
Jr. Member
Posts: 69
Karma: 4
Re: [SOLVED] Dyndns for provider Loopia broken
«
Reply #8 on:
November 22, 2017, 02:06:02 pm »
Ah! Making my life easy are you
EDIT: Can confirm, the edit wasn't removed by 17.7.8
«
Last Edit: November 22, 2017, 04:40:55 pm by magnust
»
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
17.7 Legacy Series
»
[SOLVED] Dyndns for provider Loopia broken