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

    Dynamic DNS + one.com?

    Scheduled Pinned Locked Moved Swedish
    35 Posts 12 Posters 15.8k 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.
    • T
      thebonden
      last edited by

      hi how do i install it on a pfsense +

      1 Reply Last reply Reply Quote 0
      • M
        markewert
        last edited by

        Hello @viktor_g

        I am trying to get this working on 2.6.0. I receive the following error no matter what variation of hostname or FQDN I use in the Hostname and Domain Name fields:

        Mar 2 04:29:39 php-fpm 67880 /services_dyndns_edit.php: Could not find one.com hostname record id

        Prior to that the log entries show that it did get the IP for the correct interface. I have verified the username and password are correct. Verbose logging is enabled. I am using a TTL of 600. On the status screen it shows status as failed (red X) with a cached IP in red of 0.0.0.0.

        Please let me know if there is anything I should try or other info I can send.

        THANKS!

        Mark

        M 1 Reply Last reply Reply Quote 0
        • M
          markewert @markewert
          last edited by

          Hello again. I realized how much I was over paying one.com for DNS service so I transferred my domain to a provider that works great with pfsense dynamic DNS. So I am no longer in need of help - or able to troubleshoot this. Thanks for the help you would have provided :)

          E 1 Reply Last reply Reply Quote 0
          • E
            Eriond @markewert
            last edited by

            @markewert May we know which provider you switched to? I'm not too happy with one.com either, due to their email policy changes lately.

            M 1 Reply Last reply Reply Quote 0
            • M
              markewert @Eriond
              last edited by markewert

              @eriond

              Sure! I switched to dynu.com. It's full featured and just works (which is what you want in DNS). It's also very reasonably priced ($9.99 a year plus one-time $21.99 if you need to transfer a domain).

              Here's their privacy policy. I'd appreciate it if you notice anything similar to what is giving you concerns about one.com. Thanks!

              Dynu Privacy Policy

              M

              S 1 Reply Last reply Reply Quote 0
              • S
                Sofie @markewert
                last edited by

                Was hoping this would be resolved in 2.6.0 but unfortunately I'm getting the same errors as @markewert and abandoning one.com isn't really an option for me.
                Still hoping this can be resolved somehow.

                1 Reply Last reply Reply Quote 0
                • A
                  Arques
                  last edited by

                  I registered a domain on one.com today and just found out that the one.com DDNS updater in pfsense 2.6.0 doesn't work with it.

                  After quite a lot of hours this afternoon though I did finally manage to figure out what the issue is and fix it. The fix is not very nice though because I have 0 experience patching pfSense and basically 0 experience with php.

                  But the problems are these:

                  • pfSense tries to log in by posting the form to the same URL it gets redirected to after visiting "https://www.one.com/admin/". This might have worked in the past but it doesn't work anymore. The form now has to be posted to the url pointed to in the <form>-tag action attribute.
                    Ugly? fix:
                  -$last_url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
                  +//$last_url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
                  +$dom = new DOMDocument;
                  +$dom->loadHTML($output);
                  +$formTag = $dom->getElementsByTagName("form")[0];
                  +$last_url = $formTag->getAttribute("action");
                  
                  • It seems like the login form data has to be posted in a different format.
                  // login in
                  -$post_data['username'] = $this->_dnsUser;
                  -$post_data['password'] = $this->_dnsPass;
                  -$post_data['credentialId'] = '';
                  
                  -curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
                  +curl_setopt($ch, CURLOPT_POSTFIELDS, 'username=' . $this->_dnsUser . '&password=' . $this->_dnsPass . '&credentialId=');
                  +curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
                  
                  • This line seems to concatenate incorrectly:
                  -$url = "https://www.one.com/admin/api/domains/" . $this->_dnsDomain + "/dns/custom_records";
                  +$url = "https://www.one.com/admin/api/domains/" . $this->_dnsDomain . "/dns/custom_records";
                  

                  (Result was that $url became "0")

                  • After this I was getting HTTP 400/500 errors when downloading this page and it seemed to be some issue with remaining curl_setopt settings I was unable to reset. But I solved it for now by running:
                  curl_reset($ch);
                  curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
                  curl_setopt($ch, CURLOPT_INTERFACE, 'if!' . $realparentif);
                  
                  • I also replaced the CURLOPT_COOKIE and cookie extractor regex with CURLOPT_COOKIEFILE & CURLOPT_COOKIEJAR located in /var/tmp, which might not be needed and might not be the most secure option.
                  • Final problem is that the webinterface doesn't let me save an empty hostname which makes this script unable to update the ip for the root domain. For now I made an ugly hack which forces me to create an entry called "root" which gets replaced with "" in the update script which can then update the root domain. I tried to use "@" initially because the documentation says "Cloudflare, Linode: Enter @ as the hostname to indicate an empty field." but when picking Service type "One.com" the @ is still considered an invalid character.

                  For now I really have to go to bed but I might try to clean this up a bit more in the coming days/weeks. I'd like to figure out if I can avoid using curl_reset and perhaps go back to using CURLOPT_COOKIE instead of COOKIEJAR and COOKIEFILE. Perhaps after this I'll try to experiment with creating an actual system patch and/or report the issue over at redmine.

                  A 1 Reply Last reply Reply Quote 0
                  • A
                    Arques @Arques
                    last edited by

                    @arques Today I cleaned up my patch a bit and created a proper pfSense system patch that applies cleanly to version 2.6.0. I created a redmine issue about this and attached my patch to it. It can be viewed here: https://redmine.pfsense.org/issues/14276

                    Dobby_D 1 Reply Last reply Reply Quote 1
                    • Dobby_D
                      Dobby_ @Arques
                      last edited by Dobby_

                      @arques said in Dynamic DNS + one.com?:

                      @arques Today I cleaned up my patch a bit and created a proper pfSense system patch that applies cleanly to version 2.6.0. I created a redmine issue about this and attached my patch to it. It can be viewed here: https://redmine.pfsense.org/issues/14276

                      Well done! But it is not applying to the pfSense+ version 23.01, I got out the following error;

                      Die folgenden Eingabefehler wurden erkannt:
                      (The following error was recognized)

                      The uploaded file must be in unified diff format.

                      EDIT:
                      Solved! By using that URL: DynDNS Patch

                      #~. @Dobby

                      Turris Omnia - 4 Ports - 2 GB RAM / TurrisOS 7 Release (Btrfs)
                      PC Engines APU4D4 - 4 Ports - 4 GB RAM / pfSense CE 2.7.2 Release (ZFS)
                      PC Engines APU6B4 - 4 Ports - 4 GB RAM / pfSense+ (Plus) 24.03_1 Release (ZFS)

                      A 1 Reply Last reply Reply Quote 0
                      • A
                        Arques @Dobby_
                        last edited by

                        @dobby_ Okay, I actually never tried to upload to patch file so I'm not sure what's wrong with it. What I did was I just pasted the contents of the file in the "Patch Contents" field, and then I created the file afterwards after applying that way worked for me. Perhaps there could be something wrong with line endings or something with the file...

                        Glad the URL works instead though, that's probably a better way to apply the patch anyways.

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