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

    Dynamic DNS Update Not Working

    Scheduled Pinned Locked Moved DHCP and DNS
    9 Posts 3 Posters 688 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
      toriol
      last edited by

      Ever since I migrated to new hardware and upgraded to 2.7, my dynamic DNS with FreeDNS will not update when it was previously working in 2.6. I tried searching the forums, but none of the existing posts have helped.

      My old router was a Dell PowerEdge 1950 running 2.6 CE. My new router is a Beelink EQ12 running 2.7 CE. I backed up my configuration before I shutdown my old router, booted my new router (I already installed 2.7 CE), and restored my configuration.

      Here is the dashboard of my new router:
      pfSense Dashboard

      Note: I’m with Starlink so I have to deal with CGNAT. To get port forwarding working I signed up with Hoppy which gives me a WireGuard tunnel with which to forward ports. That all works correctly.

      First, I checked the logs. The correct IP gets detected (the Hoppy IP).

      Next, I deleted and recreated my FreeDNS entry making sure I used my API key for the password. Here is the settings screen:
      Dynamic DNS Settings

      Then, I tried to force an update. Here is the output of the log:
      System Logs

      Next, just to confirm things do work with FreeDNS, I manually updated from the SSH console on the router using curl. Here is the output:
      Manual Console Update

      Unfortunately, since this is a built-in service, I’m unable to uninstall and reinstall the package with the “preserve data” option unchecked.

      At this point, I’m unable to debug further. Does anyone have any suggestions?

      GertjanG 1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan @toriol
        last edited by Gertjan

        @toriol said in Dynamic DNS Update Not Working:

        suggestions

        Yes.
        You used curl, like the scripted version.
        With one difference :
        21ef6928-1311-41fc-9227-d49fc0e16822-image.png

        So, use curl again, and select manually this tun_wg0 ? interface.

        Redo the same command, and add the -v or --verbose option. Can you see which interface curl used ?
        This interface worked.

        Now, chose the interface that you've set up in the GUI WG0 :
        Something like
        curl --verbose --interface tun_wg0 ..........

        The parent interface used is OPT1 - not WAN ?

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

        Bob.DigB T 2 Replies Last reply Reply Quote 0
        • Bob.DigB
          Bob.Dig LAYER 8 @Gertjan
          last edited by Bob.Dig

          I don't get it, this hoppy-service has a dynamic IP too?

          T 1 Reply Last reply Reply Quote 0
          • T
            toriol @Gertjan
            last edited by

            @Gertjan

            I tried as suggested. I got an SSL timeout. Just to be sure, I tried www.google.com. That seems to work.
            Terminal Tests

            Just to make sure I'm hitting the right server, I did a quick DNS query. The IP addresses for freedns.afraig.org match.
            DNS Query

            Yes, the parent interface is OPT1. That's the interface tied to the WireGuard tunnel that goes to Hoppy that handles the port forwarding. I want the dynamic DNS to update to the Hoppy IP so that the services I expose have a friendly name.

            GertjanG 1 Reply Last reply Reply Quote 0
            • T
              toriol @Bob.Dig
              last edited by

              @Bob-Dig No, not a dynamic IP. I get a static IP, but more importantly I get a port forwarding service because I can't forward ports over Starlink which uses CGNAT.

              1 Reply Last reply Reply Quote 0
              • GertjanG
                Gertjan @toriol
                last edited by

                @toriol said in Dynamic DNS Update Not Working:

                I got an SSL timeout.

                Yep :

                128ea1b5-413b-4286-bca2-3227a5ad9bf6-image.png

                The other side never answers.
                So, you can't reach 69.42.215.252 (port 443) using that interface.

                Can you ping it ?
                If so, there is no routing issue. and your request is blocked at the "afraid.org" gates ( using a using a VPN filter, which I can understand )
                If not : routing issue or tunnel not connected.

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

                T 1 Reply Last reply Reply Quote 0
                • T
                  toriol @Gertjan
                  last edited by

                  @Gertjan

                  Just to confirm this isn't an SSL issue I checked the certificate chain using Qualys SSL Labs:
                  SSL Check

                  Then, as you suggested, I checked ping using the tun_wg0 interface as the source. That didn't work. Just to be sure I checked using my normal gateway. That didn't work either. I'm assuming freedns.afraid.org does not respond to ping.
                  ping check

                  That did get me thinking about the routing possibility. I have NAT and FW rules in-place to accept port forward traffic only. No outbound masquerading rules exist. On the FreeDNS documentation page it says you can override the address reported so I tried that.
                  Manual curl with address override

                  That worked. I assume that's because it sent the request over my default gateway. I don't plan on allowing masquerading over the tun_wg0 interface since it's supposed to be inbound port forwards only.

                  This is weird for me because this all worked in 2.6 without any special curl commands. I see there is a custom DNS option along with the ability to send the update request from a different interface. I'm going to see if I can get that to work.

                  T 1 Reply Last reply Reply Quote 0
                  • T
                    toriol @toriol
                    last edited by toriol

                    I got the custom DNS to work for the most part. I originally left the password as the token and set the URL to https://freedns.afraid.org/update.php. That didn't work so then I left the username and password fields blank. I put the entire update URL including the token in the URL field. Here is my configuration:
                    new dynamic DNS configuration

                    This is unfortunate since my token is now logged in plain text.
                    new dynamic DNS log

                    The only part I can't get working is the result match. The output from FreeDNS includes the time taken to update which I can't seem to use regex to match. I've removed it and now things seem to work again.
                    successful update

                    It would be nice if the native FreeDNS settings included the option to select the update interface, but I'm happy with this for now.

                    GertjanG 1 Reply Last reply Reply Quote 0
                    • GertjanG
                      Gertjan @toriol
                      last edited by

                      @toriol

                      Yeah, it doesn't reply to ping.

                      0c4419d0-db03-4d96-9633-76b4afc14044-image.png

                      If the resulting message contains "Updated" then you're good, no need to match more then that.

                      I'm using freedns.afraid.org myself for other service : backup DNS servers for my host names.

                      Never used their dynamic host name services before.
                      I've created a host name : "just-a-test.chickenkiller.com".

                      I thought the GUI 'afraid' password was needed, but it was the token.
                      I found the token here :

                      a39234e4-b4db-48e1-814c-9ae8a5a07979-image.png

                      It's mentioned in the script several times.

                      So, no 'user' neither 'password'.

                      From bottom to top :

                      2023-10-16 07:47:59.425777+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Dynamic DNS freedns (just-a-test.chickenkiller.com): _update() ending.
                      2023-10-16 07:47:59.425682+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Dynamic DNS freedns (just-a-test.chickenkiller.com): _checkStatus() ending.
                      2023-10-16 07:47:59.425577+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: phpDynDNS (just-a-test.chickenkiller.com): (Success) No Change In IP Address
                      2023-10-16 07:47:59.425125+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: phpDynDNS: updating cache file /conf/dyndns_wanfreedns'just-a-test.chickenkiller.com'1.cache: 82.127.26.111
                      2023-10-16 07:47:59.422062+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Dynamic DNS freedns (just-a-test.chickenkiller.com): 82.127.26.111 extracted from Check IP Service
                      2023-10-16 07:47:58.521987+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Dynamic DNS freedns (just-a-test.chickenkiller.com): _checkIP() starting.
                      2023-10-16 07:47:58.521864+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Dynamic DNS freedns (just-a-test.chickenkiller.com): _checkStatus() starting.
                      2023-10-16 07:47:58.521814+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Response Data: ERROR: Address 82.127.26.111 has not changed.
                      2023-10-16 07:47:58.521797+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Response Header:
                      2023-10-16 07:47:58.521782+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Response Header:
                      2023-10-16 07:47:58.521767+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Response Header: X-Cache: MISS
                      2023-10-16 07:47:58.521740+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Response Header: Expires: Mon, 26 Jul 1997 05:00:00 GMT
                      2023-10-16 07:47:58.521725+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Response Header: Pragma: no-cache
                      2023-10-16 07:47:58.521710+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Response Header: Cache-Control: post-check=0, pre-check=0
                      2023-10-16 07:47:58.521696+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Response Header: Cache-Control: no-store, no-cache, must-revalidate
                      2023-10-16 07:47:58.521680+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Response Header: Vary: Accept-Encoding
                      2023-10-16 07:47:58.521665+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Response Header: Connection: keep-alive
                      2023-10-16 07:47:58.521650+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Response Header: Transfer-Encoding: chunked
                      2023-10-16 07:47:58.521635+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Response Header: Content-Type: text/plain;charset=UTF-8
                      2023-10-16 07:47:58.521620+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Response Header: Date: Mon, 16 Oct 2023 05:47:41 GMT
                      2023-10-16 07:47:58.521603+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Response Header: Server: nginx
                      2023-10-16 07:47:58.521564+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Response Header: HTTP/1.1 200 OK
                      2023-10-16 07:47:57.708502+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Dynamic DNS freedns (just-a-test.chickenkiller.com): _update() starting.
                      2023-10-16 07:47:57.708472+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: DynDns (just-a-test.chickenkiller.com): Dynamic Dns: cacheIP != wan_ip. Updating. Cached IP: 0.0.0.0 WAN IP: 82.127.26.111 Initial update.
                      2023-10-16 07:47:57.708434+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Dynamic Dns (just-a-test.chickenkiller.com): Current WAN IP: 82.127.26.111 No Cached IP found.
                      2023-10-16 07:47:57.708183+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Dynamic DNS freedns (just-a-test.chickenkiller.com): 82.127.26.111 extracted from Check IP Service
                      2023-10-16 07:47:56.161143+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Dynamic DNS freedns (just-a-test.chickenkiller.com): _checkIP() starting.
                      2023-10-16 07:47:56.161116+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Dynamic DNS freedns (just-a-test.chickenkiller.com): _detectChange() starting.
                      2023-10-16 07:47:56.160937+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Dynamic DNS (just-a-test.chickenkiller.com): running get_failover_interface for wan. found ix3
                      2023-10-16 07:47:56.160875+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Dynamic DNS freedns (just-a-test.chickenkiller.com): 82.127.26.111 extracted from Check IP Service
                      2023-10-16 07:47:54.728922+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Dynamic DNS freedns (just-a-test.chickenkiller.com): _checkIP() starting.
                      2023-10-16 07:47:54.727893+02:00 	php-fpm 	65511 	/services_dyndns_edit.php: Dynamic DNS: updatedns() starting
                      

                      I had of course a soft error, as my IPv4 didn't change, it was already set to the correct IP addresses.

                      You agree, nothing changed @ freedns ?!

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

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