Namecheap dyndns and psuedo-subdomain hostnames.

  • Namecheap happily supports hostnames like

    However, it appears that the dyndns parser on pfSense incorrectly determines the hostname as www and domain name as instead of the hostname as www.sub and domain name 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''.cache: x.x.x.x
    Jan 25 16:34:17 	php: /services_dyndns_edit.php: phpDynDNS: (Error) Domain name not found

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

  • Rebel Alliance Developer Netgate

    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 and

    I suppose because namecheap doesn't use the username field we could use that as a prefix for the host, so it would be, username=www, so the whole record would end up being: host=www.sub - 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;" that it could fall back to if it's found.

  • 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.

  • Rebel Alliance Developer Netgate

    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.

  • Rebel Alliance Developer Netgate

    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.

  • Patch tested and working. Thanks for the quick fix!

Log in to reply