summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRene Schuster <mail@reneschuster.de>2015-12-04 13:55:44 +0100
committerRene Schuster <mail@reneschuster.de>2015-12-04 13:55:44 +0100
commitf3ee8545bb006141b4a9cd6fcdb1bd611f3a7ab7 (patch)
treeadcfbefcc403a9a3c5317311e7030228ba6aff58 /src
parent6293d7edb1be7aa0813815679809c82a72eb7554 (diff)
downloadpfsense-f3ee8545bb006141b4a9cd6fcdb1bd611f3a7ab7.zip
pfsense-f3ee8545bb006141b4a9cd6fcdb1bd611f3a7ab7.tar.gz
Add DynDNS provider SPDNS (IPv4 and IPv6)
SPDNS is a free DynDNS service from the German company Securepoint Security Solutions
Diffstat (limited to 'src')
-rw-r--r--src/etc/inc/dyndns.class41
-rw-r--r--src/etc/inc/services.inc4
2 files changed, 43 insertions, 2 deletions
diff --git a/src/etc/inc/dyndns.class b/src/etc/inc/dyndns.class
index 610afad..a241485 100644
--- a/src/etc/inc/dyndns.class
+++ b/src/etc/inc/dyndns.class
@@ -33,6 +33,8 @@
* - DNSimple (dnsimple.com)
* - Google Domains (domains.google.com)
* - DNS Made Easy (www.dnsmadeeasy.com)
+ * - SPDNS (spdns.de)
+ * - SPDNS IPv6 (spdns.de)
* +----------------------------------------------------+
* Requirements:
* - PHP version 4.0.2 or higher with the CURL Library and the PCRE Library
@@ -79,6 +81,8 @@
* DNSimple - Last Tested: 09 February 2015
* Google Domains - Last Tested: 27 April 2015
* DNS Made Easy - Last Tested: 27 April 2015
+ * SPDNS - Last Tested: 04 December 2015
+ * SPDNS IPv6 - Last Tested: 04 December 2015
* +====================================================+
*
* @author E.Kristensen
@@ -179,6 +183,7 @@
switch ($dnsService) {
case 'he-net-v6':
case 'custom-v6':
+ case 'spdns-v6':
$this->_useIPv6 = true;
break;
default:
@@ -254,6 +259,8 @@
case 'dnsimple':
case 'googledomains':
case 'dnsmadeeasy':
+ case 'spdns':
+ case 'spdns-v6':
$this->_update();
if ($this->_dnsDummyUpdateDone == true) {
// If a dummy update was needed, then sleep a while and do the update again to put the proper address back.
@@ -821,6 +828,20 @@
$server = "https://cp.dnsmadeeasy.com/servlet/updateip";
curl_setopt($ch, CURLOPT_URL, $server . '?username=' . $this->_dnsUser . '&password=' . $this->_dnsPass . '&id=' . $this->_dnsHost . '&ip=' . $this->_dnsIP);
break;
+ case 'spdns':
+ case 'spdns-v6':
+ $needsIP = FALSE;
+ if ($this->_dnsVerboseLog)
+ log_error("SPDNS: ({$this->_dnsHost}) DNS update() starting.");
+ curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser.':'.$this->_dnsPass);
+ $server = "https://update.spdns.de/nic/update";
+ $port = "";
+ if($this->_dnsServer)
+ $server = $this->_dnsServer;
+ if($this->_dnsPort)
+ $port = ":" . $this->_dnsPort;
+ curl_setopt($ch, CURLOPT_URL, $server .$port . '?hostname=' . $this->_dnsHost . '&myip=' . $this->_dnsIP);
+ break;
default:
break;
}
@@ -1417,6 +1438,26 @@
break;
}
break;
+ case 'spdns':
+ case 'spdns-v6':
+ if (preg_match('/notfqdn/i', $data)) {
+ $status = "phpDynDNS ({$this->_dnsHost}): (Error) Not A FQDN!";
+ } else if (preg_match('/nohost/i', $data)) {
+ $status = "phpDynDNS ({$this->_dnsHost}): (Error) No such host";
+ } else if (preg_match('/nochg/i', $data)) {
+ $status = "phpDynDNS ({$this->_dnsHost}): (Success) No Change In IP Address";
+ $successful_update = true;
+ } else if (preg_match('/good/i', $data)) {
+ $status = "phpDynDNS ({$this->_dnsHost}): (Success) IP Address Changed Successfully! (".$this->_dnsIP.")";
+ $successful_update = true;
+ } else if (preg_match('/badauth/i', $data)) {
+ $status = "phpDynDNS ({$this->_dnsHost}): (Error) User Authorization Failed";
+ } else {
+ $status = "phpDynDNS ({$this->_dnsHost}): (Unknown Response)";
+ log_error("phpDynDNS ({$this->_dnsHost}): PAYLOAD: {$data}");
+ $this->_debug($data);
+ }
+ break;
}
if ($successful_update == true) {
diff --git a/src/etc/inc/services.inc b/src/etc/inc/services.inc
index 2b4cd4a..da9a28e 100644
--- a/src/etc/inc/services.inc
+++ b/src/etc/inc/services.inc
@@ -38,8 +38,8 @@
pfSense_MODULE: utils
*/
-define('DYNDNS_PROVIDER_VALUES', 'citynetwork cloudflare custom custom-v6 dnsexit dnsimple dnsmadeeasy dnsomatic dyndns dyndns-custom dyndns-static dyns easydns eurodns freedns glesys googledomains gratisdns he-net he-net-v6 he-net-tunnelbroker loopia namecheap noip noip-free ods opendns ovh-dynhost route53 selfhost zoneedit');
-define('DYNDNS_PROVIDER_DESCRIPTIONS', 'City Network,CloudFlare,Custom,Custom (v6),DNSexit,DNSimple,DNS Made Easy,DNS-O-Matic,DynDNS (dynamic),DynDNS (custom),DynDNS (static),DyNS,easyDNS,Euro Dns,freeDNS,GleSYS,Google Domains,GratisDNS,HE.net,HE.net (v6),HE.net Tunnelbroker,Loopia,Namecheap,No-IP,No-IP (free),ODS.org,OpenDNS,OVH DynHOST,Route 53,SelfHost,ZoneEdit');
+define('DYNDNS_PROVIDER_VALUES', 'citynetwork cloudflare custom custom-v6 dnsexit dnsimple dnsmadeeasy dnsomatic dyndns dyndns-custom dyndns-static dyns easydns eurodns freedns glesys googledomains gratisdns he-net he-net-v6 he-net-tunnelbroker loopia namecheap noip noip-free ods opendns ovh-dynhost route53 selfhost spdns spdns-v6 zoneedit');
+define('DYNDNS_PROVIDER_DESCRIPTIONS', 'City Network,CloudFlare,Custom,Custom (v6),DNSexit,DNSimple,DNS Made Easy,DNS-O-Matic,DynDNS (dynamic),DynDNS (custom),DynDNS (static),DyNS,easyDNS,Euro Dns,freeDNS,GleSYS,Google Domains,GratisDNS,HE.net,HE.net (v6),HE.net Tunnelbroker,Loopia,Namecheap,No-IP,No-IP (free),ODS.org,OpenDNS,OVH DynHOST,Route 53,SelfHost,SPDNS,SPDNS (v6),ZoneEdit');
/* implement ipv6 route advertising daemon */
function services_radvd_configure($blacklist = array()) {
OpenPOWER on IntegriCloud