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

    Namecheap dyndns and psuedo-subdomain hostnames.

    Scheduled Pinned Locked Moved DHCP and DNS
    8 Posts 2 Posters 2.6k 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.
    • D Offline
      ddimick
      last edited by

      Namecheap happily supports hostnames like www.sub.domain.com.

      However, it appears that the dyndns parser on pfSense incorrectly determines the hostname as www and domain name as sub.domain.com instead of the hostname as www.sub and domain name domain.com. Or at least this is what I'm assuming since the log on pfSense is returning an error of domain not found in this scenario.

      Is this something that should work?

      Jan 25 16:34:17 	php: /services_dyndns_edit.php: DynDns: DynDns _update() starting.
      Jan 25 16:34:17 	php: /services_dyndns_edit.php: Namecheap: DNS update() starting.
      Jan 25 16:34:17 	php: /services_dyndns_edit.php: DynDns: DynDns _checkStatus() starting.
      Jan 25 16:34:17 	php: /services_dyndns_edit.php: DynDns: Current Service: namecheap
      Jan 25 16:34:17 	php: /services_dyndns_edit.php: DynDns debug information: x.x.x.x extracted from local system.
      Jan 25 16:34:17 	php: /services_dyndns_edit.php: phpDynDNS: updating cache file /conf/dyndns_wannamecheap'host.sub.domain.com'.cache: x.x.x.x
      Jan 25 16:34:17 	php: /services_dyndns_edit.php: phpDynDNS: (Error) Domain name not found
      
      1 Reply Last reply Reply Quote 0
      • D Offline
        ddimick
        last edited by

        Discovered today that their Windows dyndns client can handle this scenario without difficulty, so it's definitely a pfSense issue.

        1 Reply Last reply Reply Quote 0
        • jimpJ Offline
          jimp Rebel Alliance Developer Netgate
          last edited by

          Yeah we split on ., I didn't realize their client supported that syntax.

          Though that makes things a little trickier, right now it's just this:

          list($hostname, $domain) = explode(".", $this->_dnsHost, 2);
          

          To do the other way, it would have to split by making an array there and taking the last two, but then that would break things like co.uk and org.uk

          I suppose because namecheap doesn't use the username field we could use that as a prefix for the host, so it would be hostname=sub.domain.org, username=www, so the whole record would end up being: host=www.sub domain=domain.com - but that's sure not intuitive…

          Adding another field to the page isn't really feasible, the whole page would need to be redesigned with some javascript to only show the field when namecheap is selected, or we could use some other kind of delimiter inside of the hostname field perhaps "www.sub;domain.com" that it could fall back to if it's found.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • D Offline
            ddimick
            last edited by

            Created bug #2144. http://redmine.pfsense.org/issues/2144

            1 Reply Last reply Reply Quote 0
            • D Offline
              ddimick
              last edited by

              Thanks, Jim. Not sure if I should keep this on the bug tracker or here.

              It's probable that other dyndns providers also accept hostnames including dots, since it's legal A record syntax. This could be more pervasive than just Namecheap. In that case, splitting host/domain into two fields on the page for all dyndns providers would be a good solution. Much easier to just implode for providers that don't separate hostname and domain in their update syntax.

              1 Reply Last reply Reply Quote 0
              • jimpJ Offline
                jimp Rebel Alliance Developer Netgate
                last edited by

                Discussion should stay here, mostly.

                That would be a valid point except (as I mentioned on the ticket), only Namecheap requires separate parameters, and that would have the potential to break a lot more than it would fix.

                Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

                1 Reply Last reply Reply Quote 0
                • jimpJ Offline
                  jimp Rebel Alliance Developer Netgate
                  last edited by

                  I checked in the fix I mentioned on the ticket, you can apply the change by hand and see if it makes it work for you.

                  https://github.com/bsdperimeter/pfsense/commit/89bbb204ad58c4d0250ebabf34ebec1996a53088

                  Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    ddimick
                    last edited by

                    Patch tested and working. Thanks for the quick fix!

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