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

    /services_dyndns_edit.php: phpDynDNS: (Unknown Response)

    Scheduled Pinned Locked Moved General pfSense Questions
    21 Posts 6 Posters 3.5k Views 5 Watching
    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.
    • A Offline
      amello @plfinch
      last edited by

      @plfinch
      Thanks for the tip. I'll check the patch and apply.

      1 Reply Last reply Reply Quote 0
      • stephenw10S Offline
        stephenw10 Netgate Administrator
        last edited by

        That patch is in the 'recommended patches' list in the new System Patches package so it's one click to apply it.

        Steve

        P B 2 Replies Last reply Reply Quote 2
        • P Offline
          plfinch @stephenw10
          last edited by

          @stephenw10 I was very pleasantly surprised this morning when I updated package patches and saw the list of recommended patches with Redmine numbers listed. This is great!

          Peter

          1 Reply Last reply Reply Quote 0
          • B Offline
            bdaniel7 @stephenw10
            last edited by

            @stephenw10
            Hi, I have the same problem. The response from namecheap is not correctly parsed. I applied the patch for Redmine #12816 to pfSense 2.6.0-RELEASE, but the response is still not parsed. The cached IP still says 0.0.0.0. I have also rebooted the router.

            1 Reply Last reply Reply Quote 0
            • stephenw10S Offline
              stephenw10 Netgate Administrator
              last edited by

              What is namecheap responding with?

              Does it correctly update from a different dyndns client?

              Steve

              B 1 Reply Last reply Reply Quote 0
              • B Offline
                bdaniel7 @stephenw10
                last edited by

                <?xml version="1.0" encoding="utf-16"?>
                <interface-response>
                <Command>SETDNSHOST</Command>
                <Language>eng</Language>
                <IP>xxx.yyy.zzz.aaa</IP> <---- the IP from my external gateway
                <ErrCount>0</ErrCount>
                <errors/>
                <ResponseCount>0</ResponseCount>
                <responses/>
                <Done>true</Done>
                <debug><![CDATA[]]></debug>
                </interface-response>

                I'm only using namecheap for dynamic dns.

                B 1 Reply Last reply Reply Quote 0
                • B Offline
                  bdaniel7 @bdaniel7
                  last edited by

                  I removed the .cache file generated for namecheap, and now when I save the settings for its client, the .cache file contains "0.0.0.0|1661343037", and in the UI it's displayed "0.0.0.0".
                  I also added a freeDNS API Version 2 client, which corectly registers and caches the dynamic IP.

                  1 Reply Last reply Reply Quote 0
                  • stephenw10S Offline
                    stephenw10 Netgate Administrator
                    last edited by

                    Hmm, looks OK. Are you actually seeing the 'Unknown Response' error logged?

                    B 1 Reply Last reply Reply Quote 0
                    • B Offline
                      bdaniel7 @stephenw10
                      last edited by

                      Yes, this is the log generated after I saved the settings for namecheap:

                      Aug 24 16:23:04	php-fpm	11484	/services_dyndns_edit.php: phpDynDNS (home): (Unknown Response)
                      Aug 24 16:23:04	php-fpm	11484	/services_dyndns_edit.php: phpDynDNS (home): PAYLOAD: <?xml version="1.0" encoding="utf-16"?><interface-response><Command>SETDNSHOST</Command><Language>eng</Language><IP>xxx.yyy.zzz.aaa</IP><ErrCount>0</ErrCount><errors /><ResponseCount>0</ResponseCount><responses /><Done>true</Done><debug><![CDATA[]]></debug></interface-response>
                      Aug 24 16:23:04	php-fpm	11484	/services_dyndns_edit.php: Dynamic DNS namecheap (home.XMX.net): _checkStatus() starting.
                      Aug 24 16:23:04	php-fpm	11484	/services_dyndns_edit.php: Response Data: <?xml version="1.0" encoding="utf-16"?><interface-response><Command>SETDNSHOST</Command><Language>eng</Language><IP>xxx.yyy.zzz.aaa</IP><ErrCount>0</ErrCount><errors /><ResponseCount>0</ResponseCount><responses /><Done>true</Done><debug><![CDATA[]]></debug></interface-response>
                      Aug 24 16:23:04	php-fpm	11484	/services_dyndns_edit.php: Response Header:
                      Aug 24 16:23:04	php-fpm	11484	/services_dyndns_edit.php: Response Header:
                      Aug 24 16:23:04	php-fpm	11484	/services_dyndns_edit.php: Response Header: alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
                      Aug 24 16:23:04	php-fpm	11484	/services_dyndns_edit.php: Response Header: cf-ray: 73fc6680cbc5c1af-BUD
                      Aug 24 16:23:04	php-fpm	11484	/services_dyndns_edit.php: Response Header: server: cloudflare
                      Aug 24 16:23:04	php-fpm	11484	/services_dyndns_edit.php: Response Header: expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
                      Aug 24 16:23:04	php-fpm	11484	/services_dyndns_edit.php: Response Header: cf-cache-status: DYNAMIC
                      Aug 24 16:23:04	php-fpm	11484	/services_dyndns_edit.php: Response Header: strict-transport-security: max-age=16000000; includeSubDomains
                      Aug 24 16:23:04	php-fpm	11484	/services_dyndns_edit.php: Response Header: strict-transport-security: max-age=16000000; includeSubDomains
                      Aug 24 16:23:04	php-fpm	11484	/services_dyndns_edit.php: Response Header: set-cookie: .s=3b275e1f0d8248488011fad0e6fa3ad4; domain=.www.namecheap.com; path=/; httponly
                      Aug 24 16:23:04	php-fpm	11484	/services_dyndns_edit.php: Response Header: vary: Accept-Encoding
                      Aug 24 16:23:04	php-fpm	11484	/services_dyndns_edit.php: Response Header: content-type: application/json
                      Aug 24 16:23:04	php-fpm	11484	/services_dyndns_edit.php: Response Header: date: Wed, 24 Aug 2022 13:23:04 GMT
                      Aug 24 16:23:04	php-fpm	11484	/services_dyndns_edit.php: Response Header: HTTP/2 200
                      Aug 24 16:23:04	php-fpm	11484	/services_dyndns_edit.php: Dynamic DNS namecheap (home.XMX.net): _update() starting.
                      Aug 24 16:23:04	php-fpm	11484	/services_dyndns_edit.php: Dynamic DNS (home.XMX.net): running get_failover_interface for wan. found igb0
                      Aug 24 16:23:04	php-fpm	11484	/services_dyndns_edit.php: Dynamic DNS namecheap (home.XMX.net): xxx.yyy.zzz.aaa extracted from Check IP Service
                      Aug 24 16:23:03	php-fpm	11484	/services_dyndns_edit.php: Dynamic DNS namecheap (home.XMX.net): _checkIP() starting.
                      Aug 24 16:23:03	php-fpm	11484	/services_dyndns_edit.php: Dynamic DNS: updatedns() starting
                      
                      1 Reply Last reply Reply Quote 0
                      • stephenw10S Offline
                        stephenw10 Netgate Administrator
                        last edited by

                        Hmm, looks exactly like what that patch should correct.

                        Does it show as applied? Is the change actually present in /etc/inc/dyndns.class?

                        B 1 Reply Last reply Reply Quote 0
                        • B Offline
                          bdaniel7 @stephenw10
                          last edited by

                          This is the namecheap section in the /etc/inc/dyndns.class file:

                          30877f76-3203-4102-9b0c-933da07bd62c-image.png

                          S 1 Reply Last reply Reply Quote 0
                          • S Offline
                            SteveITS Rebel Alliance @bdaniel7
                            last edited by

                            @bdaniel7 See also thread https://forum.netgate.com/topic/173646/namecheap-dynamic-dns-seems-to-be-broken-again

                            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 reboot, or more depending on packages, and device or disk speed.
                            Upvote 👍 helpful posts!

                            1 Reply Last reply Reply Quote 0
                            • stephenw10S Offline
                              stephenw10 Netgate Administrator
                              last edited by

                              Hmm, sure looks like the response is correct. 🤔

                              B 1 Reply Last reply Reply Quote 0
                              • B Offline
                                bdaniel7 @stephenw10
                                last edited by

                                @stephenw10
                                With my limited php experience I was able to find out the problem.
                                The response is an xml sent on one line, with the encoding set to utf-16, so line $ncresponse = xml2array(substr($tmp, strpos($tmp, "\n") + 1)); gets executed, and $ncresponse is actually empty.
                                Which means that $ncresponse does not match any of the ifs. so it ends up in the last else.

                                B 1 Reply Last reply Reply Quote 0
                                • B Offline
                                  bdaniel7 @bdaniel7
                                  last edited by bdaniel7

                                  I just added this line
                                  $tmp = str_replace("utf-16", "utf-8", $data);
                                  under line
                                  $tmp = str_replace("^M", "", $data);.

                                  It's rather crude, but it works :))

                                  edit:
                                  This could work too: $tmp = str_replace("utf-16\"?>", "utf-16\"?>\n", $data);

                                  1 Reply Last reply Reply Quote 3
                                  • First post
                                    Last post
                                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.