Another Dynamic DNS provider (DTDNS)
spiorf last edited by
I need to use dtdns as dynamic dns provider because is the only one who provides wildcards for free accounts, so i modified the /etc/inc/dyndns.class to change the "noip" url for ip address update to make it work for dtdns.
It works perfectly, but it's an ugly hack. I tried to fully integrate it but failed miserably breaking everything and having to reinstall…
These are the changes i've made in the function _update()
Except the commented line, the $server variable and the curl_setop line are the only changes.
case 'noip': $needsIP = TRUE; curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); $server = "http://www.dtdns.com/api/autodns.cfm"; //http://dynupdate.no-ip.com/ducupdate.php http://www.dtdns.com/api/autodns.cfm?id=####HOSTNAME####&pw=####PASSWORD#### $port = ""; if($this->_dnsServer) $server = $this->_dnsServer; if($this->_dnsPort) $port = ":" . $this->_dnsPort; curl_setopt($ch, CURLOPT_URL, $server . '?id=' . $this->_dnsHost. '&pw=' . urlencode($this->_dnsPass)); $data = curl_exec($ch); if (@curl_error($ch)) log_error("Curl error occurred: " . curl_error($ch)); curl_close($ch); $this->_checkStatus($data); break;
It's pretty straightforward, and works perfectly (at least in my setup) but it's not "how it is supposed to be".
Can someone point me to the files i need to modify so that i can provide a nice clean patch?
Thanks (for this and also for the whole pfSense!)
spiorf last edited by
Ok, i managed to add it correctly i think…
It now shows up in the dyndns provider list, and checks return codes correctly. And noip is not fake anymore.
The only problem i had is that here at work we use 184.108.40.206/16 for lan (used as WAN in pfsense), and this ip is not correctly detected as private by is_private_ip(). are we incorrectly using this ip class or is the is_private_ip function wrong?
Sorry if i don't provide a diff against sources, but i'm not a developer i just have basic "change existing code" skills.
I copied back and forth the files using ssh and edited them.
The version the original files come from is 2.0-BETA5 (i386) built on Sun Jan 16 21:23:13 EST 2011: