Navigation

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

    Dynamic DNS + one.com?

    Swedish
    10
    31
    5310
    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.
    • B
      biifer last edited by

      Försöker hjälpa min far som har en domän och webhosting hos one.com. Är det möjligt att använda Dynamic DNS i pfSense och uppdatera DNS som ligger hos one.com? Tanken är att ha kvar webhosting, mail o.s.v hos one.com men ha vissa subdomäner "hemma". Någon som har provat detta?

      1 Reply Last reply Reply Quote 1
      • L
        Lugico last edited by Lugico

        I made a python script that lets you dynamically change the IP address a dns entry is pointing to.
        So far it only works for type A record subdomains. If you need a different type, please try to reconfigure the script yourself. If you're not experienced with python, you can contact me and i will try to adapt the script.

        === IMPORTANT EDIT ===
        There is a new version of this script, and also a GitHub Repository.
        Most recent version will always be on GitHub!

        The outdated script can be found here:
        http://lugico.de/ddns.py
        Everything below is old.
        =====================

        execute it like this:

        python3 ddns.py youripaddress
        

        Run this every once in a while, maby through crontab, and you should be good.

        you can get your ip address in plain text from this address: https://api.ipify.org/?format=text

        combining the two could look like this (on linux):

        IP=$(curl https://api.ipify.org/?format=text); python3 my_ddns.py $IP
        

        Also, i dont speak swedish, i used google translate.
        If you need any help using the script, feel free to contact me through this email: main@lugico.de

        T 1 Reply Last reply Reply Quote 1
        • T
          Technoid.se @Lugico last edited by

          @Lugico

          Thank you for the script, it works perfectly for me 😃

          H 1 Reply Last reply Reply Quote 1
          • H
            hellfire @Technoid.se last edited by

            @technoid-se hi! is it still working?, been looking everywhere for something like this.

            L 1 Reply Last reply Reply Quote 0
            • L
              Lugico @hellfire last edited by

              @hellfire Yes the script should still be working, but you won't need to get your IP address beforehand andymore. The script will do that for you. I can send you an updated version, that is even simpler to use.

              1 Reply Last reply Reply Quote 1
              • L
                Lugico last edited by Lugico

                Ok for everyone still finding this thread:

                I made a new, updated version, that is much simpler to use.
                https://lugico.de/one_com_ddns.py
                Most recent version can be found on GitHub

                Edit the file beforehand to fit your needs. All the things you might have to change are in the top few lines. Execute it like this:

                python3 one_com_ddns.py
                

                python can be downloaded and installed from here: https://www.python.org/downloads/
                or on debian / ubuntu based machines, including raspberry pi OS, it can be installed using apt:

                sudo apt-get install python3
                

                You will also need to install the requests package.

                sudo pip3 install requests
                

                or

                sudo pip install requests
                

                on windows just remove the "sudo"

                @hellfire

                H 2 Replies Last reply Reply Quote 1
                • H
                  hellfire @Lugico last edited by

                  @lugico Thanks a lot, this well spare me 3rd party apps & the monthly verification.

                  I'm adding some keywords to make users find this (both swedish and English) :

                  dynamic ip one.com, update DNS automatically with your dynamic ip
                  dynamiskt ip one.com, uppdatera dns automatiskt med ditt dynamiska ip

                  1 Reply Last reply Reply Quote 0
                  • H
                    hellfire @Lugico last edited by hellfire

                    @lugico couldn't get it to work, got username, PW, and id number, domain everything is correct.
                    I noticed the id number is different depending on what subdomain you want to change..

                    {"result":null,"metadata":{"messages":[{"text":"No matching order found for current user matching requested domain name","code":"CRMRST_000302","arguments":null,"type":"error"}]}}
                    89.160.xxx.xxx (my ip)
                    
                    L 1 Reply Last reply Reply Quote 0
                    • L
                      Lugico @hellfire last edited by

                      @hellfire that looks like the output from the old script. try using the new one
                      https://lugico.de/one_com_ddns.py

                      H 2 Replies Last reply Reply Quote 1
                      • H
                        hellfire @Lugico last edited by

                        @lugico will try, your previous link to the new script, links to the old one...

                        1 Reply Last reply Reply Quote 0
                        • H
                          hellfire @Lugico last edited by

                          @lugico it worked fine!
                          .. now I just need to learn python, so it can be tweaked (would be great if it saved the last updated ip and checked if the ip has changed before it logs in and update it)

                          L 1 Reply Last reply Reply Quote 0
                          • L
                            Lugico @hellfire last edited by

                            @hellfire I just added this feature. If you click the link again you should get the new version. It saves the last IP address in a file ("lastip.txt") and only if the content of the file and the current IP address don't match, the script gets executed.

                            H 1 Reply Last reply Reply Quote 1
                            • H
                              hellfire @Lugico last edited by

                              @lugico Works perfect! thx a lot!

                              1 Reply Last reply Reply Quote 1
                              • viktor_g
                                viktor_g Netgate last edited by

                                feature request created: https://redmine.pfsense.org/issues/11293

                                1 Reply Last reply Reply Quote 1
                                • E
                                  Eriond last edited by

                                  @Lugico Is it so that I missed this terrific script by a mere half year?
                                  (ie. the link provided above now leads to 404 page)

                                  L 1 Reply Last reply Reply Quote 0
                                  • L
                                    Lugico @Eriond last edited by

                                    Hi @eriond
                                    I did some restructuring on my Website and forgot about the script.
                                    Check the link again in a few minutes, I'll update it right now.

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

                                      @lugico Excellent, thank you! If there is a way to make it permanently available, like via the wayback machine or something similar, that would be great...

                                      L 1 Reply Last reply Reply Quote 1
                                      • L
                                        Lugico @Eriond last edited by Lugico

                                        https://pastebin.com/uCeZ8eKK
                                        Made a pastebin with the Script in case my Website ever doesn't work.

                                        Edit: There is a GitHub Repo now

                                        1 Reply Last reply Reply Quote 1
                                        • L
                                          Lugico last edited by Lugico

                                          Hello everyone,
                                          as of recently one.com has changed their login back end. Therefore some changes on the script were necessary.

                                          I have updated the script to work again as of Sep. 7th 2021.

                                          The newest version is again available on my website (direct download), pastebin and now also on GitHub

                                          Please always use the GitHub, as it's the most recent version.

                                          H D 2 Replies Last reply Reply Quote 2
                                          • H
                                            hellfire @Lugico last edited by

                                            @lugico Thank you!
                                            Really appreciate it!

                                            1 Reply Last reply Reply Quote 1
                                            • D
                                              DerDomml @Lugico last edited by DerDomml

                                              @lugico I literally just registered on this website to say thank you!! You are my hero for making this script. Please notify us should you ever consider not supporting this script anymore!

                                              You could also have a look at this question over on SO. Maybe we can rely on this "network interface restarts when ISP IP changes" and automatically run the script whenever that happens!

                                              1 Reply Last reply Reply Quote 1
                                              • viktor_g
                                                viktor_g Netgate last edited by

                                                redmine issue for code update is created:
                                                https://redmine.pfsense.org/issues/12352

                                                Could you test this patch to check that it works on the Services / Dynamic DNS tab?

                                                386.diff

                                                see https://docs.netgate.com/pfsense/en/latest/development/system-patches.html

                                                S L 2 Replies Last reply Reply Quote 0
                                                • S
                                                  Sofie @viktor_g last edited by

                                                  @viktor_g

                                                  Tried patching this but no luck. I'm new to this so good chance I messed it up somehow but here's the log.


                                                  |diff --git a/src/etc/inc/dyndns.class b/src/etc/inc/dyndns.class
                                                  |index ae8b3451b7ac9510fd3480c486fdac35f251520e..54a4a2bb8f21e0bf3d5ab0aba190933cd9b14106 100644
                                                  |--- a/src/etc/inc/dyndns.class

                                                  +++ b/src/etc/inc/dyndns.class
                                                  Patching file etc/inc/dyndns.class using Plan A...
                                                  Hunk #1 failed at 453.
                                                  Hunk #2 succeeded at 1183 (offset -49 lines).
                                                  Hunk #3 succeeded at 1225 (offset -49 lines).
                                                  Hunk #4 succeeded at 1263 (offset -49 lines).
                                                  1 out of 4 hunks failed while patching etc/inc/dyndns.class

                                                  I'm on 2.5.2-RELEASE (amd64)

                                                  1 Reply Last reply Reply Quote 0
                                                  • L
                                                    Lugico @viktor_g last edited by

                                                    @viktor_g Hi, just a small heads-up. I haven't actually used or contributed to pfSense yet so this is all still very new to me. I'll look into it though and try to give you feedback asap.

                                                    viktor_g 1 Reply Last reply Reply Quote 0
                                                    • viktor_g
                                                      viktor_g Netgate @Lugico last edited by

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

                                                      @viktor_g Hi, just a small heads-up. I haven't actually used or contributed to pfSense yet so this is all still very new to me. I'll look into it though and try to give you feedback asap.

                                                      You can test one.com DDNS on the latest 2.6/22.01 RC

                                                      1 Reply Last reply Reply Quote 0
                                                      • 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
                                                                  • First post
                                                                    Last post