mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Merge pull request #857 from Wraul/add_city_network_dyndns
Added support for City Network to Dynamic DNS.
This commit is contained in:
commit
e6000a9bc6
@ -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)) {
|
||||
|
||||
@ -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() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user