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

Dynamic DNS *NOT* Updating "Cached IP"

DHCP and DNS
10
36
7.8k
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.
  • N
    nikolaosinlight @barnettd
    last edited by Dec 13, 2021, 10:36 PM

    @barnettd

    So setting up a custom Dynamic DNS for Namecheap only works for me if I leave Result Match blank - even if I modify the IP address and save the full response as the following it does not work - so if Namecheap fails to update I am completely hosed:

    <?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>
    

    I opened a ticket with Namecheap and this was their first response:

    "You are right, unfortunately, we have such a glitch in our system currently. Our technical department is working on the resolution, however, we have no certain time frames when the issue is solved. Although, we have checked it from our side, and it does not affect the main functionality of the Dynamic DNS feature, and the IP address should be updated successfully. We see from your request, that you may face an issue with the regular propagation. The only case is to wait up to 30 minutes till the A record is propagated to a new one. Unfortunately, such a process cannot be sped up, as it is for a 100% automatic one and it is a regular procedure. "

    When I responded that the above makes not sense as Namecheap fully updates but it is rather the response that is not properly formulated for pfsense to process and moreover pfsense will keep trying pointlessly they said:

    "We perfectly understand your concern. The matter regarding the incorrect encoding format has been already escalated. To our regret, there is no ETA yet."

    Changing the encoding of a response from UTF-16 to UTF-8 is not rocket science.

    As such, I am not holding my breath and think it is time to look at other Registrars (we have been doing more and more with AWS recently so likely will go that route).

    --Nikolaos

    1 Reply Last reply Reply Quote 0
    • S
      SteveITS Galactic Empire @bmeeks
      last edited by Dec 13, 2021, 10:53 PM

      From the Reddit page, "They think a recent change in php started enforcing the UTF encoded verification, which means it's possible namecheap's xml response has been wrong for quite some time but not noticed until now." I have no idea but is there a way to turn that off in PHP? Not a great solution but could be a workaround. The odd thing is it doesn't look like PHP was updated in 21.05.x/2.5.x builds. There was the JIT/PCRE fix for the 3100 and 1000.

      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!

      N 1 Reply Last reply Dec 13, 2021, 11:04 PM Reply Quote 0
      • N
        nikolaosinlight @SteveITS
        last edited by Dec 13, 2021, 11:04 PM

        @steveits
        I pointed Namecheap to the Reddit post and this post and they say they have no ETA.

        I get software interfaces are hard to update especially if they have worked well in the past so they definitely don't want to break existing functionality but seems like they will not fix is my guess. If they do... great... but from their response it does not seem likely it will be anytime soon or possibly ever.

        --Nikolaos

        G 1 Reply Last reply Dec 13, 2021, 11:31 PM Reply Quote 0
        • G
          Gertjan @nikolaosinlight
          last edited by Gertjan Dec 13, 2021, 11:33 PM Dec 13, 2021, 11:31 PM

          @nikolaosinlight

          Then the solution, even temporary, is rather easy :
          change dyndns.class behavior so it accepts the 'new' answer as the 'all is good' answer.

          This

          ... ($ncresponse['interface-response']['ErrCount'] === "0") ....
          

          part should be 0 or '0' or - I don't know, some new UTF like 0 or '0'
          Is it an integer value - a text value ? 8 bit or other type of encoding ?

          Whatever, make the test 'succeed' and you will all be good.
          A soon as it re breaks again, undo the edits and the story is over.

          Btw : I can't play with this myself, as I'm not a namecheap customer.

          edit : I hope for them that this is only a dyndns.class problem, because, if not, every customer that uses a dyndns client will hammer their Dyndns service constantly ....

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          S 1 Reply Last reply Dec 13, 2021, 11:58 PM Reply Quote 0
          • S
            SteveITS Galactic Empire @Gertjan
            last edited by Dec 13, 2021, 11:58 PM

            @gertjan said in Dynamic DNS *NOT* Updating "Cached IP":

            change dyndns.class behavior so it accepts the 'new' answer

            I suspect the issue is that $ncresponse is considered empty since the response is invalid due to the incorrect encoding. (or something similar, I did not look into this at all, just reading posts)

            Presumably from Namecheap's standpoint they want to send changes through QA/testing so as not to break things for everyone else.

            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
            • B
              bmeeks
              last edited by Dec 14, 2021, 12:15 AM

              Here is a link to the other site's issue on this Namecheap dynamic DNS problem: https://github.com/opnsense/plugins/issues/2666#issuecomment-979154701.

              If you follow the comments and links, you may uncover a way to duplicate the workaround on pfSense. I highly doubt the source code nor specific file matches, but the overall gist of the fix should be applicable on pfSense. Note that the "fix" is really just a temp workaround until Namecheap fixes their core issue.

              The root cause of the problem is incorrect type coding by Namecheap.

              B 1 Reply Last reply Dec 14, 2021, 5:01 AM Reply Quote 0
              • B
                biggsy @bmeeks
                last edited by Dec 14, 2021, 5:01 AM

                I asked Namecheap whether there are maximum or minimum limits on update frequency for their dynamic DNS service that could cause blocking of updates or expiry of the mapping.

                The answer was, "There are no limitation on the update frequency." However, Cloudflare is in the mix there, too, so I guess I'll find out.

                Before getting that response, I decided on manually updating the unix timestamps in the /cf/conf/dyndns*.cache files to prevent needless (and possibly excessive) updates being generated.

                Hopefully this will be fixed soon - one way or another.

                N 1 Reply Last reply Dec 14, 2021, 6:05 AM Reply Quote 0
                • N
                  nikolaosinlight @biggsy
                  last edited by nikolaosinlight Dec 14, 2021, 6:07 AM Dec 14, 2021, 6:05 AM

                  @bmeeks

                  Actually the source code aligned pretty closely to the patch. It was trivial to add but did not work:

                                              case 'namecheap':
                                                      // $tmp = str_replace("^M", "", $data);
                                                      $tmp = preg_replace('/(\<\?xml[^?]+?encoding=.?)utf-16([^?]+?\?\>)/i', '$1utf-8$2', $data);
                                                      $ncresponse = @xml2array($tmp);
                  

                  This essentially simply provides a regex that translates the response XML to instead of saying UTF-16 it says UTF-8. It does nothing to deal with potentially receiving UTF-16 characters. I have no idea why Namecheap is even trying to use UTF-16... been coding in Java for 24 years and while yes UTF-16 is there and all almost every app still created today uses UTF-8 throughout.

                  @Gertjan your idea to change the return code may work but I think there are bigger issues with the response since if I include in a Custom Namecheap client a Result Match that is exactly as expected with IP made as variable %IP% it does not work. I need Result Match blank so I do not think that I am even going to get to the point of that line of code anywhere near matching.

                  I have the Custom "Dumb" Namecheap clients working so I will stick to that... and I will look to move to another registrar. Getting tired with a number of things with Namecheap lately.

                  S 1 Reply Last reply Dec 14, 2021, 3:36 PM Reply Quote 0
                  • S
                    SteveITS Galactic Empire @nikolaosinlight
                    last edited by Dec 14, 2021, 3:36 PM

                    @nikolaosinlight Possibly something with mb_convert_encoding?

                    $tmp = mb_convert_encoding($data, "UTF-8", "UTF-16");

                    Bit of a hack, but might work until Namecheap fixes their end.

                    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!

                    G 1 Reply Last reply Feb 7, 2022, 10:14 AM Reply Quote 0
                    • S SteveITS referenced this topic on Dec 21, 2021, 3:59 PM
                    • G
                      greymouser @SteveITS
                      last edited by Feb 7, 2022, 10:14 AM

                      Any chance this temp fix is going to be added? I'm seeing the same thing, and assuming Namecheap is going to be slow to fix this it would be nice to get it working. I'm going to submit a support ticket with them as well to keep the pressure on. It really is unfortunate that such as easy fix on their end is being delayed this much.

                      1 Reply Last reply Reply Quote 0
                      • P
                        pulpito
                        last edited by Feb 21, 2022, 12:17 PM

                        ticket opened by me regarding this issue

                        G 1 Reply Last reply Feb 21, 2022, 12:29 PM Reply Quote 0
                        • G
                          Gertjan @pulpito
                          last edited by Feb 21, 2022, 12:29 PM

                          @pulpito said in Dynamic DNS *NOT* Updating "Cached IP":

                          ticket

                          Where ?

                          You saw https://redmine.pfsense.org/issues/12816 ?
                          Tried the solution proposed over there ?

                          No "help me" PM's please. Use the forum, the community will thank you.
                          Edit : and where are the logs ??

                          P 1 Reply Last reply Feb 21, 2022, 4:59 PM Reply Quote 0
                          • P
                            pulpito @Gertjan
                            last edited by Feb 21, 2022, 4:59 PM

                            @gertjan I opened a ticket in Namecheap

                            and... I tried the solution proposed and now the cached Ip appear green ...
                            I,m not expert but seems that this solution or workaround works
                            thanks for sharing

                            S 1 Reply Last reply Jul 17, 2022, 1:09 PM Reply Quote 0
                            • S
                              samh @pulpito
                              last edited by samh Jul 17, 2022, 1:12 PM Jul 17, 2022, 1:09 PM

                              Having the same/similar issue. Using namecheap on PFSense 2.6.0 with system patch applied (the one to reportedly work around the UTF-16 encode issue) but still getting Unknown response in log.

                              Here is the last set of log entries.

                              Appreciate any thoughts

                              Jul 17 08:55:44	php-fpm	12752	/services_dyndns_edit.php: phpDynDNS (hassio): (Unknown Response)
                              Jul 17 08:55:44	php-fpm	12752	/services_dyndns_edit.php: phpDynDNS (hassio): PAYLOAD: <?xml version="1.0" encoding="utf-16"?><interface-response><Command>SETDNSHOST</Command><Language>eng</Language><IP>99.x.x.x</IP><ErrCount>0</ErrCount><errors /><ResponseCount>0</ResponseCount><responses /><Done>true</Done><debug><![CDATA[]]></debug></interface-response>
                              Jul 17 08:55:44	php-fpm	12752	/services_dyndns_edit.php: Dynamic DNS namecheap (hassio.redacted): _checkStatus() starting.
                              Jul 17 08:55:44	php-fpm	12752	/services_dyndns_edit.php: Response Data: <?xml version="1.0" encoding="utf-16"?><interface-response><Command>SETDNSHOST</Command><Language>eng</Language><IP>99.x.x.x</IP><ErrCount>0</ErrCount><errors /><ResponseCount>0</ResponseCount><responses /><Done>true</Done><debug><![CDATA[]]></debug></interface-response>
                              Jul 17 08:55:44	php-fpm	12752	/services_dyndns_edit.php: Response Header:
                              Jul 17 08:55:44	php-fpm	12752	/services_dyndns_edit.php: Response Header:
                              Jul 17 08:55:44	php-fpm	12752	/services_dyndns_edit.php: Response Header: alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
                              Jul 17 08:55:44	php-fpm	12752	/services_dyndns_edit.php: Response Header: cf-ray: 72c3222f9fa45997-IAD
                              Jul 17 08:55:44	php-fpm	12752	/services_dyndns_edit.php: Response Header: server: cloudflare
                              Jul 17 08:55:44	php-fpm	12752	/services_dyndns_edit.php: Response Header: expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
                              Jul 17 08:55:44	php-fpm	12752	/services_dyndns_edit.php: Response Header: cf-cache-status: DYNAMIC
                              Jul 17 08:55:44	php-fpm	12752	/services_dyndns_edit.php: Response Header: strict-transport-security: max-age=16000000; includeSubDomains
                              Jul 17 08:55:44	php-fpm	12752	/services_dyndns_edit.php: Response Header: strict-transport-security: max-age=16000000; includeSubDomains
                              Jul 17 08:55:44	php-fpm	12752	/services_dyndns_edit.php: Response Header: set-cookie: .s=xxxxxxx; domain=.www.namecheap.com; path=/; httponly
                              Jul 17 08:55:44	php-fpm	12752	/services_dyndns_edit.php: Response Header: vary: Accept-Encoding
                              Jul 17 08:55:44	php-fpm	12752	/services_dyndns_edit.php: Response Header: content-type: application/json
                              Jul 17 08:55:44	php-fpm	12752	/services_dyndns_edit.php: Response Header: date: Sun, 17 Jul 2022 12:55:44 GMT
                              Jul 17 08:55:44	php-fpm	12752	/services_dyndns_edit.php: Response Header: HTTP/2 200
                              Jul 17 08:55:43	php-fpm	12752	/services_dyndns_edit.php: Dynamic DNS namecheap (hassio.redacted): _update() starting.
                              
                              V 1 Reply Last reply Jul 17, 2022, 1:16 PM Reply Quote 0
                              • V
                                viragomann @samh
                                last edited by Jul 17, 2022, 1:16 PM

                                @samh
                                Seems as Namecheap changed the response content again.
                                Lately discussed here: https://forum.netgate.com/topic/173426/namecheap-dynamic-dns-cached-ip-0-0-0-0-issue

                                S 1 Reply Last reply Jul 17, 2022, 1:53 PM Reply Quote 1
                                • S
                                  samh @viragomann
                                  last edited by Jul 17, 2022, 1:53 PM

                                  @viragomann Thanks. Will follow over there.

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