Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Namecheap Dynamic DNS seems to be broken again

    Scheduled Pinned Locked Moved DHCP and DNS
    19 Posts 5 Posters 2.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • occamsrazorO
      occamsrazor
      last edited by occamsrazor

      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.

      pfSense CE on Qotom Q355G4 8GB RAM/60GB SSD
      Ubiquiti Unifi wired and wireless network, APC UPSs
      Mac OSX and IOS devices, QNAP NAS

      P 1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        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.");
        

        Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        P 1 Reply Last reply Reply Quote 1
        • P
          pfpv @jimp
          last edited by

          @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)"

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            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.

            Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            P 1 Reply Last reply Reply Quote 1
            • P
              pfpv @jimp
              last edited by

              @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.

              1 Reply Last reply Reply Quote 0
              • P
                pfpv @occamsrazor
                last edited by

                @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>
                
                1 Reply Last reply Reply Quote 0
                • jimpJ
                  jimp Rebel Alliance Developer Netgate
                  last edited by

                  You can use commit ID 70db168b7f7eb4d4e702f965aa4956e93340575f for that last fix.

                  Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  1 Reply Last reply Reply Quote 1
                  • occamsrazorO
                    occamsrazor
                    last edited by

                    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?

                    pfSense CE on Qotom Q355G4 8GB RAM/60GB SSD
                    Ubiquiti Unifi wired and wireless network, APC UPSs
                    Mac OSX and IOS devices, QNAP NAS

                    S 1 Reply Last reply Reply Quote 0
                    • jimpJ
                      jimp Rebel Alliance Developer Netgate
                      last edited by

                      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.

                      Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                      Need help fast? Netgate Global Support!

                      Do not Chat/PM for help!

                      1 Reply Last reply Reply Quote 0
                      • S
                        SteveITS Galactic Empire @occamsrazor
                        last edited by

                        @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.

                        Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                        When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                        Upvote ๐Ÿ‘ helpful posts!

                        occamsrazorO 1 Reply Last reply Reply Quote 0
                        • occamsrazorO
                          occamsrazor @SteveITS
                          last edited by

                          @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?_=1667925480997

                          No, 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.

                          pfSense CE on Qotom Q355G4 8GB RAM/60GB SSD
                          Ubiquiti Unifi wired and wireless network, APC UPSs
                          Mac OSX and IOS devices, QNAP NAS

                          1 Reply Last reply Reply Quote 0
                          • occamsrazorO occamsrazor referenced this topic on
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.