Namecheap Dynamic DNS seems to be broken again
-
I tried to switch to custom DNS. Namecheap provides an option to do it by URL https://dynamicdns.park-your-domain.com/update?...
I entered the correct URL, copied the response which is Response Data:
<?xml version="1.0" encoding="utf-16"?><interface-response><Command>SETDNSHOST</Command><Language>eng</Language><IP>MyIP</IP><ErrCount>0</ErrCount><errors /><ResponseCount>0</ResponseCount><responses /><Done>true</Done><debug><![CDATA[]]></debug></interface-response>
I replaced MyIP with %IP% per instructions and copied the whole thing into the Result Match field. Pressed Save & Force Update. Went to logs and see
/services_dyndns_edit.php: phpDynDNS (@): (Error) Result did not match.
and then a string that's an exact match to the string in the Response Data. I even copied them into Notepad++ and compared them to be sure, and they were an exact match.
What is wrong here? Should I escape slashes? The instructions suggest to escape only |.
P.S. I tried escaping slashes and it didn't help.
P.P.S. I escaped question marks and an exclamation mark and it didn't help. Anyone? -
There is a rather recent namecheap thread. Read it ... and cry.
They changed something, a couple of months ago.
Then they admitted on their support forums that they've fckd up - and it took some to correct this.
In the mean time, pfSense published a patch ( ? ) so things would keep on running.Now, some weeks ago, they have finally corrected things on their side, so the patch need to be patched again. The other thread has all the details.
One might say : namecheap is to cheap, or costs to much of your time : go look else where ?
-
@pfpv said in Namecheap Dynamic DNS seems to be broken again:
I suppose pfSense keeps track of IPs by analyzing responses. I am not sure about that.
I recall a thread about that a while ago... There seems to be an edge case where if, let's say, pfSense was off, something else updated the IP at the dyn DNS provider, and pfSense is turned on again, that pfSense doesn't bother updating the dyn DNS provider to the correct IP. As opposed to sending the IP every time it checks.
-
@gertjan said in Namecheap Dynamic DNS seems to be broken again:
There is a rather recent namecheap thread. Read it ... and cry.
I read it. It doesn't seem it's Namecheap related this time. Namecheap response hasn't changed from what's in that bug #12816. The status is "fixed" but pfSense shows "Unknown response".
-
@pfpv said in Namecheap Dynamic DNS seems to be broken again:
"Unknown response".
Yeah,.
And as soon as some one adds aecho $result
in the script, we'll see that the reply isn't what it was expecting as a "Ok" result. Neither an error message.
So it defaults to "Unknown response".
Because namecheap changed something - again.Don't worry, more will post here, or on the cheap support forum, it will get figured out.
-
@gertjan said in Namecheap Dynamic DNS seems to be broken again:
@pfpv said in Namecheap Dynamic DNS seems to be broken again:
we'll see that the reply isn't what it was expecting as a "Ok" result. Neither an error message.Yet it is the same result as in the aforementioned Bug #12816 https://redmine.pfsense.org/issues/12816 that was closed 3 months ago. Look at what I get in my second post and what's shown in the bug report. Can you see any difference?
Do you have any idea why I can't match the result with the Result Match field in custom DynDNS when they are exactly the same? I can't think of any explanation besides something is up with matching in pfSense and Namecheap has nothing to do with it. Namecheap never returned any kind of an "OK" result. They simply return an updated IP enclosed in some useless stuff. pfSense just needs to match that IP with the current one, yet this is not working for some reason.
-
Sorry, I can't use namecheap as I don't have an account with them.
-
-
-
Any update to this? I am having the same problem with a new Namecheap DDS service set to a subdomain. What is weird is all the other ones that I created previously still work fine.
Here is what the previous ones look like, that seem to get the unknown response but still show in green with the correct IP address:Nov 5 17:07:07 check_reload_status 414 Syncing firewall Nov 5 17:07:07 php-fpm 96489 /services_dyndns_edit.php: Configuration Change: XXXXXXXX@127.0.0.1 (Local Database): Dynamic DNS client configured. Nov 5 17:07:02 php-fpm 376 /services_dyndns_edit.php: phpDynDNS (www): (Unknown Response) Nov 5 17:07:02 php-fpm 376 /services_dyndns_edit.php: phpDynDNS (www): PAYLOAD: <?xml version="1.0" encoding="utf-16"?><interface-response><Command>SETDNSHOST</Command><Language>eng</Language><IP>XX.XX.XX.XX</IP><ErrCount>0</ErrCount><errors /><ResponseCount>0</ResponseCount><responses /><Done>true</Done><debug><![CDATA[]]></debug></interface-response>
Then this is what the recently created one looks like:
Nov 5 17:07:08 php-fpm 96489 /services_dyndns_edit.php: phpDynDNS (SUBDOMAIN): (Unknown Response) Nov 5 17:07:08 php-fpm 96489 /services_dyndns_edit.php: phpDynDNS (SUBDOMAIN): PAYLOAD: <?xml version="1.0" encoding="utf-16"?><interface-response><Command>SETDNSHOST</Command><Language>eng</Language><IP>XX.XX.XX.XX</IP><ErrCount>0</ErrCount><errors /><ResponseCount>0</ResponseCount><responses /><Done>true</Done><debug><![CDATA[]]></debug></interface-response>
The "Configuration Change" "Dynamic DNS client configured" message never appears, and it shows with a red 0.0.0.0 in the DDNS clients list.
-
Have you tried using the patch in the system patches package?
They broke it again after that, so you might also need this:
diff --git a/src/etc/inc/dyndns.class b/src/etc/inc/dyndns.class index 63936a76ec..e71de40a50 100644 --- a/src/etc/inc/dyndns.class +++ b/src/etc/inc/dyndns.class @@ -2415,9 +2415,19 @@ case 'namecheap': $tmp = str_replace("^M", "", $data); $ncresponse = @xml2array($tmp); - /* If XML parsing failed, it may be due to mismatched encoding on the response, drop the xml line. */ + /* If XML parsing failed, it may be due to unsupported encoding on the response. */ if (empty($ncresponse)) { - $ncresponse = @xml2array(substr($tmp, strpos($tmp, "\n") + 1)); + mb_convert_encoding($tmp, 'UTF-8', 'UTF-16'); + $tmp = str_ireplace('utf-16', 'utf-8', $tmp); + $ncresponse = @xml2array($tmp); + } + /* If it's still empty, try parsing without the XML definition */ + if (empty($ncresponse)) { + $matches = []; + preg_match("/(<?xml.*?>)(.*)/", $tmp, $matches); + if (count($matches) == 3) { + $ncresponse = @xml2array($matches[2]); + } } if (preg_match("/internal server error/i", $data)) { $status = $status_intro . $error_str . gettext("Server side error.");
-
@jimp said in Namecheap Dynamic DNS seems to be broken again:
Have you tried using the patch in the system patches package?
I don't see any relevant patches in the package on 22.05. There is only one there: "Fix for CRL expiration lifetime default and maximum values (Redmine #13424)"
-
22.05 had the first fix built in (2.6.0 didn't) but the above diff I posted came after 22.05 so you probably still need that.
You can install the System Patches package and then create an entry for the diff to apply the fix.
-
@jimp said in Namecheap Dynamic DNS seems to be broken again:
22.05 had the first fix built in (2.6.0 didn't) but the above diff I posted came after 22.05 so you probably still need that.
You can install the System Patches package and then create an entry for the diff to apply the fix.
Thanks. Is there a URL or commit ID for the above? I can copy the code but maybe the patch should be available for those who don't check the forums.
-
@occamsrazor said in Namecheap Dynamic DNS seems to be broken again:
Any update to this? I am having the same problem with a new Namecheap DDS service set to a subdomain.
Strangely the custom DynDNS started to work some time after I made my second post in this thread and has worked ever since. I have this in the Result Match field:
<?xml version="1.0" encoding="utf-16"?><interface-response><Command>SETDNSHOST</Command><Language>eng</Language><IP>%IP%</IP><ErrCount>0</ErrCount><errors /><ResponseCount>0</ResponseCount><responses /><Done>true</Done><debug><![CDATA[]]></debug></interface-response>
-
You can use commit ID
70db168b7f7eb4d4e702f965aa4956e93340575f
for that last fix. -
What doesn't make sense to me is why do the existing Namecheap dyndns services I set up long ago still work fine, and it's only the new one I created recently that has the issue, with all of them on the same machine?
-
I'm not sure, to be honest. The problem is that the Namecheap responses started coming tagged with
utf-16
encoding which isn't fully supported by all the various libraries involved in processing the requests.It's possible that some older domains or entries tickle the Namecheap API in a different way where their responses are still coming through UFT-8, or they may be working by chance in some other way.
-
@occamsrazor said in Namecheap Dynamic DNS seems to be broken again:
why do the existing Namecheap dyndns services I set up long ago still work fine, and it's only the new one I created recently that has the issue
If you look at your system log does it actually succeed? Or are you assuming it's working because it's green? :) I have a daily 1am entry with "Unknown Response." I suspect (without looking) that "Unknown Response" != "fail" in the code...? If the IP didn't change no one would know it was failing.
-
@steveits said in Namecheap Dynamic DNS seems to be broken again:
@occamsrazor said in Namecheap Dynamic DNS seems to be broken again:
why do the existing Namecheap dyndns services I set up long ago still work fine, and it's only the new one I created recently that has the issue
If you look at your system log does it actually succeed? Or are you assuming it's working because it's green? :) I have a daily 1am entry with "Unknown Response." I suspect (without looking) that "Unknown Response" != "fail" in the code...? If the IP didn't change no one would know it was failing.
You could be right on that. My IP never actually changes (!) these DDNS services are really just in case it does. See my post here:
https://forum.netgate.com/topic/173646/namecheap-dynamic-dns-seems-to-be-broken-again/9?_=1667925480997No, with the existing ones I still get "unknown response" but then I DO get a "Configuration Change" message. With the new ones I don't get that. I'm not sure what it all means.
-
O occamsrazor referenced this topic on