summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorMathias Andersson <wraul@dbox.se>2013-11-14 22:05:22 +0100
committerMathias Andersson <wraul@dbox.se>2013-11-14 22:06:03 +0100
commit2206f1b90f96ad40695a61baddc9958298075d5e (patch)
tree80ef7f253509723752cdf933433ac30dd6100636 /etc
parenteef01b14df77186f9c1205e9e5cb83f80407d7fd (diff)
downloadpfsense-2206f1b90f96ad40695a61baddc9958298075d5e.zip
pfsense-2206f1b90f96ad40695a61baddc9958298075d5e.tar.gz
Added support for City Network to Dynamic DNS.
City Network is a Swedish web hosting company. They provide a dynamic DNS service for their customers. This service uses the dyndns2 protocol.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/dyndns.class36
-rw-r--r--etc/inc/services.inc4
2 files changed, 38 insertions, 2 deletions
diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class
index 96a4353..49c5077 100644
--- a/etc/inc/dyndns.class
+++ b/etc/inc/dyndns.class
@@ -29,6 +29,7 @@
* - CloudFlare (www.cloudflare.com)
* - Eurodns (eurodns.com)
* - GratisDNS (gratisdns.dk)
+ * - City Network (citynetwork.se)
* +----------------------------------------------------+
* Requirements:
* - PHP version 4.0.2 or higher with the CURL Library and the PCRE Library
@@ -70,6 +71,7 @@
* Eurodns - Last Tested: 27 June 2013
* GratisDNS - Last Tested: 15 August 2012
* OVH DynHOST - Last Tested: NEVER
+ * City Network - Last Tested: 13 November 2013
* +====================================================+
*
* @author E.Kristensen
@@ -238,6 +240,7 @@
case 'eurodns':
case 'gratisdns':
case 'ovh-dynhost':
+ case 'citynetwork':
$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.
@@ -657,6 +660,20 @@
$port = ":" . $this->_dnsPort;
curl_setopt($ch, CURLOPT_URL, $server .$port . '?system=dyndns&hostname=' . $this->_dnsHost . '&myip=' . $this->_dnsIP . '&wildcard='.$this->_dnsWildcard . '&mx=' . $this->_dnsMX . '&backmx=NO');
break;
+ case 'citynetwork':
+ $needsIP = TRUE;
+ if ($this->_dnsVerboseLog)
+ log_error("City Network: ({$this->_dnsHost}) DNS update() starting.");
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
+ curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser.':'.$this->_dnsPass);
+ $server = 'https://dyndns.citynetwork.se/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;
}
@@ -706,6 +723,25 @@
$this->_debug($data);
}
break;
+ case 'citynetwork':
+ 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;
case 'ovh-dynhost':
case 'dyndns':
if (preg_match('/notfqdn/i', $data)) {
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index 6f01d2f..9feacb6 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -38,8 +38,8 @@
pfSense_MODULE: utils
*/
-define('DYNDNS_PROVIDER_VALUES', 'dnsomatic dyndns dyndns-static dyndns-custom dhs dyns easydns noip noip-free ods zoneedit loopia freedns dnsexit opendns namecheap he-net he-net-v6 he-net-tunnelbroker selfhost route53 cloudflare custom custom-v6 eurodns gratisdns ovh-dynhost');
-define('DYNDNS_PROVIDER_DESCRIPTIONS', 'DNS-O-Matic,DynDNS (dynamic),DynDNS (static),DynDNS (custom),DHS,DyNS,easyDNS,No-IP,No-IP (free),ODS.org,ZoneEdit,Loopia,freeDNS,DNSexit,OpenDNS,Namecheap,HE.net,HE.net (v6),HE.net Tunnelbroker,SelfHost,Route 53,CloudFlare,Custom,Custom (v6),Euro Dns,GratisDNS,OVH DynHOST');
+define('DYNDNS_PROVIDER_VALUES', 'dnsomatic dyndns dyndns-static dyndns-custom dhs dyns easydns noip noip-free ods zoneedit loopia freedns dnsexit opendns namecheap he-net he-net-v6 he-net-tunnelbroker selfhost route53 cloudflare custom custom-v6 eurodns gratisdns ovh-dynhost citynetwork');
+define('DYNDNS_PROVIDER_DESCRIPTIONS', 'DNS-O-Matic,DynDNS (dynamic),DynDNS (static),DynDNS (custom),DHS,DyNS,easyDNS,No-IP,No-IP (free),ODS.org,ZoneEdit,Loopia,freeDNS,DNSexit,OpenDNS,Namecheap,HE.net,HE.net (v6),HE.net Tunnelbroker,SelfHost,Route 53,CloudFlare,Custom,Custom (v6),Euro Dns,GratisDNS,OVH DynHOST,City Network');
/* implement ipv6 route advertising deamon */
function services_radvd_configure() {
OpenPOWER on IntegriCloud