Now-DNS and pfSense

The alternative to a static IP address is a server that keeps track of your dynamic IP address. When the IP address changes, the client will immediately notify the server of the new IP address. This is known as Dynamic DNS. One of the free DDNS services that I use is Now-DNS.

I’ve noticed on pfSense version 2.3.5-RELEASE-p2 that custom client update entries will not work when the update url for curl looks something like this;

curl -u <email>:<password> "https://now-dns.com/update?hostname=<hostname>"

It appears that the authentication fails when executing the client update. To fix this issue, remove the curl HTTP authentication option by commenting out the line below in the file /etc/inc/dyndns.class

<?php
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
<?php
if ($this->_curlSslVerifypeer) {
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);
  } else {
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
  }
    #curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
    curl_setopt($ch, CURLOPT_USERPWD, "{$this->_dnsUser}:{$this->_dnsPass}");
}

This does not have an adverse affect on custom client entries that use a token style update url which do not require a username or password. These urls tend to look like this;

https://www.duckdns.org/update?domains=exampledomain&token=a7c4d0ad-114e-40ef-ba1d-d217904a50f2&ip=%IP%

Updated 26 July 2018