• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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.0k 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.
  • A
    amello @FSC830
    last edited by Feb 25, 2022, 10:15 PM

    @fsc830 said in /services_dyndns_edit.php: phpDynDNS: (Unknown Response):

    You should see your setting in services - ddns menu (not sure about the exact wording)!?

    At least at my pfSense I can see and edit the command for updating the ddns service.

    Regards

    Yes, correct. It is there and with IPs 0.0.0.0 (the new one created for test) and N/A the old one (already in my config for years). In fact I've moved the install to another location in Jan and it did update the IPs. Either pf 2.6 or google are at fault.

    1 Reply Last reply Reply Quote 0
    • P
      plfinch @amello
      last edited by plfinch Feb 25, 2022, 10:15 PM Feb 25, 2022, 10:15 PM

      @amello Refer to the following post for details on a patch required for successful Google Domains Dynamic DNS updating:

      Forum Post

      Peter

      A 1 Reply Last reply Feb 25, 2022, 11:07 PM Reply Quote 1
      • A
        amello @plfinch
        last edited by Feb 25, 2022, 11:07 PM

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

        1 Reply Last reply Reply Quote 0
        • S
          stephenw10 Netgate Administrator
          last edited by Feb 26, 2022, 9:42 PM

          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 Feb 27, 2022, 5:38 AM Reply Quote 2
          • P
            plfinch @stephenw10
            last edited by Feb 27, 2022, 5:38 AM

            @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
              bdaniel7 @stephenw10
              last edited by Aug 24, 2022, 10:13 AM

              @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
              • S
                stephenw10 Netgate Administrator
                last edited by Aug 24, 2022, 11:29 AM

                What is namecheap responding with?

                Does it correctly update from a different dyndns client?

                Steve

                B 1 Reply Last reply Aug 24, 2022, 11:37 AM Reply Quote 0
                • B
                  bdaniel7 @stephenw10
                  last edited by Aug 24, 2022, 11:37 AM

                  <?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 Aug 24, 2022, 12:16 PM Reply Quote 0
                  • B
                    bdaniel7 @bdaniel7
                    last edited by Aug 24, 2022, 12:16 PM

                    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
                    • S
                      stephenw10 Netgate Administrator
                      last edited by Aug 24, 2022, 1:03 PM

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

                      B 1 Reply Last reply Aug 24, 2022, 1:27 PM Reply Quote 0
                      • B
                        bdaniel7 @stephenw10
                        last edited by Aug 24, 2022, 1:27 PM

                        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
                        • S
                          stephenw10 Netgate Administrator
                          last edited by Aug 24, 2022, 2:14 PM

                          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 Aug 24, 2022, 2:19 PM Reply Quote 0
                          • B
                            bdaniel7 @stephenw10
                            last edited by Aug 24, 2022, 2:19 PM

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

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

                            S 1 Reply Last reply Aug 24, 2022, 2:24 PM Reply Quote 0
                            • S
                              SteveITS Galactic Empire @bdaniel7
                              last edited by Aug 24, 2022, 2:24 PM

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

                              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!

                              1 Reply Last reply Reply Quote 0
                              • S
                                stephenw10 Netgate Administrator
                                last edited by Aug 24, 2022, 3:00 PM

                                Hmm, sure looks like the response is correct. 🤔

                                B 1 Reply Last reply Aug 24, 2022, 3:16 PM Reply Quote 0
                                • B
                                  bdaniel7 @stephenw10
                                  last edited by Aug 24, 2022, 3:16 PM

                                  @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 Aug 24, 2022, 3:19 PM Reply Quote 0
                                  • B
                                    bdaniel7 @bdaniel7
                                    last edited by bdaniel7 Aug 24, 2022, 3:30 PM Aug 24, 2022, 3:19 PM

                                    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.
                                      This community forum collects and processes your personal information.
                                      consent.not_received