diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-07-20 14:37:52 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-07-20 14:37:52 +0000 |
commit | 0a1b018347bf039536ccb54b1e375006812f75ff (patch) | |
tree | ea314337a40580041a4d1fc6ef8945169a9b4c80 /etc | |
parent | 4e1f4ba638a3ecbeec44677d68f316d0f5c2fa48 (diff) | |
download | pfsense-0a1b018347bf039536ccb54b1e375006812f75ff.zip pfsense-0a1b018347bf039536ccb54b1e375006812f75ff.tar.gz |
Implement DNSexit support for DynDns Services.\n Feature Request #1588.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/dyndns.class | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class index e29309f..555b412 100644 --- a/etc/inc/dyndns.class +++ b/etc/inc/dyndns.class @@ -15,6 +15,7 @@ * - FreeDNS (freedns.afraid.org) * - Loopia (loopia.se) * - StaticCling (staticcling.org) + * - DNSexit (dnsexit.com) * +----------------------------------------------------+ * Requirements: * - PHP version 4.0.2 or higher with CURL Library @@ -43,6 +44,7 @@ * FreeDNS - Last Tested: NEVER * Loopia - Last Tested: NEVER * StaticCling - Last Tested: 27 April 2006 + * DNSexit - Last Tested: 20 July 2008 * +====================================================+ * * @author E.Kristensen @@ -50,6 +52,8 @@ * @version 0.8 * @updated 13 October 05 at 21:02:42 GMT * + * DNSexit support and multiwan extension for pfSense by Ermal Luçi + * */ class updatedns { @@ -83,8 +87,8 @@ global $config; - $this->_cacheFile = "/cf/conf/dyndns_{$dnsIf}.cache"; - $this->_debugFile = "/var/etc/dyndns_{$dnsIf}.debug"; + $this->_cacheFile = "/var/etc/dyndns_{$dnsIf}{$dnsService}.cache"; + $this->_debugFile = "/var/etc/dyndns_{$dnsIf}{$dnsService}.debug"; log_error("DynDns: updatedns() starting"); @@ -136,7 +140,8 @@ $this->_dnsService == 'ods' || $this->_dnsService == 'freedns' || $this->_dnsService == 'loopia' || - $this->_dnsService == 'staticcling') + $this->_dnsService == 'staticcling'|| + $this->_dnsService == 'dnsexit') { $this->_update(); } else { @@ -370,6 +375,14 @@ curl_close($ch); $this->_checkStatus($data); break; + case 'dnsexit': + $needsIP = TRUE; + curl_setopt($ch, CURLOPT_URL, 'http://www.dnsexit.com/RemoteUpdate.sv?login='.$this->_dnsUser. '&password='.$this->_dnsPass.'&host='.$this->_dnsHost.'&myip='.$this->_dnsIP); + $data = curl_exec($ch); + if (@curl_error($ch)) log_error("Curl errror occured:" . curl_error($ch)); + curl_close($ch); + $this->_checkStatus($data); + break; case 'loopia': $needsIP = TRUE; curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); @@ -642,6 +655,19 @@ $this->_debug($data); } break; + case 'dnsexit': + if (preg_match("/is the same/i", $data)) { + $status = "phpDynDns: (Success) No Change In IP Address"; + $successful_update = true; + } else if (preg_match("/Success/i", $data)) { + $status = "phpDynDNS: (Success) IP Address Changed Successfully!"; + $successful_update = true; + } else { + $status = "phpDynDNS: (Unknown Response)"; + log_error("phpDynDNS: PAYLOAD: {$data}"); + $this->_debug($data); + } + break; case 'loopia': if (preg_match("/nochg/i", $data)) { $status = "phpDynDNS: (Success) No Change In IP Address"; |