https://redmine.pfsense.org/https://redmine.pfsense.org/favicon.ico?16780521162012-01-26T11:42:17ZpfSense bugtrackerpfSense - Bug #2144: pfSense dyndns for Namecheap doesn't work with hostnames containing "."https://redmine.pfsense.org/issues/2144?journal_id=76682012-01-26T11:42:17ZJim Pingle
<ul><li><strong>Category</strong> set to <i>Dynamic DNS</i></li><li><strong>Target version</strong> set to <i>2.1</i></li><li><strong>Affected Architecture</strong> <i>All</i> added</li><li><strong>Affected Architecture</strong> deleted (<del><i></i></del>)</li></ul><p>(Copying my reply from the forum post here)<br />Yeah we split on ., I didn't realize their client supported that syntax.</p>
<p>Though that makes things a little trickier, right now it's just this:</p>
<pre>
list($hostname, $domain) = explode(".", $this->_dnsHost, 2);
</pre>
<p>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</p>
<p>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...</p>
<p>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.</p> pfSense - Bug #2144: pfSense dyndns for Namecheap doesn't work with hostnames containing "."https://redmine.pfsense.org/issues/2144?journal_id=76692012-01-26T11:55:33ZDoug Dimickdoug@dimick.net
<ul></ul><p>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.</p> pfSense - Bug #2144: pfSense dyndns for Namecheap doesn't work with hostnames containing "."https://redmine.pfsense.org/issues/2144?journal_id=76702012-01-26T12:03:26ZJim Pingle
<ul></ul><p>Except that would break everyone's current settings unless we tried to be smart with some upgrade code (which could still guess wrong).</p>
<p>Another way (one I'll probably commit at least for now) since Namecheap only supports .co.uk / .org.uk / .me.uk is something like this:</p>
<pre>
$dparts = explode(".", $this->_dnsHost);
$domain_part_count = ($dparts[count($dparts)-1] == "uk") ? 3 : 2;
$domain_offset = count($dparts) - $domain_part_count;
$hostname = implode(".", array_slice($dparts, 0, $domain_offset));
$domain = implode(".", array_slice($dparts, $domain_offset));
</pre>
<p>Other providers would not be affected because none of the other providers require separate hostname and domain parameters except for Namecheap, so it would still be redesigning the whole page to support one provider.</p> pfSense - Bug #2144: pfSense dyndns for Namecheap doesn't work with hostnames containing "."https://redmine.pfsense.org/issues/2144?journal_id=76712012-01-26T12:15:10ZJim Pingle
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Feedback</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset <a class="changeset" title="Be smarter about how to split a Namecheap hostname into host/domain. Fixes #2144" href="https://redmine.pfsense.org/projects/pfsense/repository/2/revisions/e8fc69ff43bb089f90de4f87f02db44f55a96b40">e8fc69ff43bb089f90de4f87f02db44f55a96b40</a>.</p> pfSense - Bug #2144: pfSense dyndns for Namecheap doesn't work with hostnames containing "."https://redmine.pfsense.org/issues/2144?journal_id=76722012-01-26T12:15:10ZJim Pingle
<ul></ul><p>Applied in changeset <a class="changeset" title="Be smarter about how to split a Namecheap hostname into host/domain. Fixes #2144" href="https://redmine.pfsense.org/projects/pfsense/repository/2/revisions/89bbb204ad58c4d0250ebabf34ebec1996a53088">89bbb204ad58c4d0250ebabf34ebec1996a53088</a>.</p> pfSense - Bug #2144: pfSense dyndns for Namecheap doesn't work with hostnames containing "."https://redmine.pfsense.org/issues/2144?journal_id=85202012-03-31T00:20:08ZChris Buechlercbuechler@gmail.com
<ul></ul><p>can anyone confirm this is fixed?</p> pfSense - Bug #2144: pfSense dyndns for Namecheap doesn't work with hostnames containing "."https://redmine.pfsense.org/issues/2144?journal_id=88762012-05-08T14:34:08ZJim Pingle
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Resolved</i></li></ul><p>I added a hostname with a . to one of my domains using Namecheap DNS and it updated fine, so this is fixed.</p> pfSense - Bug #2144: pfSense dyndns for Namecheap doesn't work with hostnames containing "."https://redmine.pfsense.org/issues/2144?journal_id=144072014-07-30T14:57:05ZLance Cottonlcotton@securecms.com
<ul></ul><p>Pardon me for re-opening this old bug, but I've finally gotten tired of manually updating my "dynamic" DNS entry hosted by namecheap.com's service.</p>
<p>My "domain" with namecheap is a delegated sub-domain, within which I have several hosts.</p>
<p>For example, the domain is dyn.example.com<br />I have a host: host1<br />The complete FQDN is host1.dyn.example.com</p>
<p>The current script, as noted in this bugfix, extracts the domain portion by counting "." characters. But that doesn't work for me, as the domain is <strong>like</strong> the .uk example, but it's a .com.</p>
<p>I understand the hesitation to update the GUI for just this one provider who requires the domain and host entries separated. Could perhaps a non-allowed character be used as a sentinel for the break between host and domain, and the dyndns.class file will split on that? Then the only GUI update might be an added instruction sentence for namecheap users.</p>
<p>For example, I might enter in the pfSense GUI the hostname host1/dyn.example.com to indicate which part is which.</p>