summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorChris Wells <chris@openharbor.net>2011-05-14 10:39:13 -0400
committerChris Wells <chris@openharbor.net>2011-05-14 10:39:13 -0400
commit8ea77433a9dd1d7ab5812e6a772903dcd8347c1a (patch)
treec5dd208a33991d9ba3f9b4829f34b347b9e07023 /etc
parenta9392a4e369212f5d54cf0cd16991d573dcdaf00 (diff)
downloadpfsense-8ea77433a9dd1d7ab5812e6a772903dcd8347c1a.zip
pfsense-8ea77433a9dd1d7ab5812e6a772903dcd8347c1a.tar.gz
Added HE.net (dns.he.net) to the list of available dyndns services.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/dyndns.class36
1 files changed, 36 insertions, 0 deletions
diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class
index dcde894..150dedc 100644
--- a/etc/inc/dyndns.class
+++ b/etc/inc/dyndns.class
@@ -18,6 +18,7 @@
* - DNSexit (dnsexit.com)
* - OpenDNS (opendns.com)
* - Namecheap (namecheap.com)
+ * - HE.net (dns.he.net)
* +----------------------------------------------------+
* Requirements:
* - PHP version 4.0.2 or higher with CURL Library
@@ -49,6 +50,7 @@
* DNSexit - Last Tested: 20 July 2008
* OpenDNS - Last Tested: 4 August 2008
* Namecheap - Last Tested: 31 August 2010
+ * HE.net - Last Tested: NEVER
* +====================================================+
*
* @author E.Kristensen
@@ -152,6 +154,7 @@
case 'dnsexit':
case 'opendns':
case 'namecheap':
+ case 'he-net':
$this->_update();
break;
default:
@@ -434,6 +437,19 @@
if (@curl_error($ch)) log_error("Curl error occurred: " . curl_error($ch));
curl_close($ch);
$this->_checkStatus($data);
+ break;
+ case 'he-net':
+ $needsIP = FALSE;
+ log_error("HE.net: DNS update() starting.");
+ $server = "https://dyn.dns.he.net/nic/update?";
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
+ curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsHost . ':' . $this->_dnsPass);
+ curl_setopt($ch, CURLOPT_URL, $server . 'hostname=' . $this->_dnsHost);
+ $data = curl_exec($ch);
+ if(@curl_error($ch)) log_error("Curl error occurred: " . curl_error($ch));
+ curl_close($ch);
+ $this->_checkStatus($data);
+ break;
default:
break;
}
@@ -754,6 +770,26 @@
$this->_debug($data);
}
break;
+
+ case 'he-net':
+ if (preg_match("/badip/i", $data)) {
+ $status = "phpDynDNS: (Error) Bad Request - The IP provided was invalid.";
+ } else if (preg_match('/nohost/i', $data)) {
+ $status = "phpDynDNS: (Error) Bad Request - A hostname was not provided.";
+ } else if (preg_match('/badauth/i', $data)) {
+ $status = "phpDynDNS: (Error) Invalid username or password.";
+ } else if (preg_match('/good/i', $data)) {
+ $status = "phpDynDNS: (Success) IP Address Updated Successfully!";
+ $successful_update = true;
+ } else if (preg_match('/nochg/i', $data)) {
+ $status = "phpDynDNS: (Success) No Change In IP Address.";
+ $successful_update = true;
+ } else {
+ $status = "phpDynDNS: (Unknown Response)";
+ log_error("phpDynDNS: PAYLOAD: {$data}");
+ $this->_debug($data);
+ }
+ break;
}
if($successful_update == true) {
OpenPOWER on IntegriCloud