. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ require("guiconfig.inc"); if (!is_array($config['dnsupdate'])) { $config['dnsupdate'] = array(); } $pconfig['username'] = $config['dyndns']['username']; $pconfig['password'] = $config['dyndns']['password']; $pconfig['host'] = $config['dyndns']['host']; $pconfig['mx'] = $config['dyndns']['mx']; $pconfig['type'] = $config['dyndns']['type']; $pconfig['enable'] = isset($config['dyndns']['enable']); $pconfig['wildcard'] = isset($config['dyndns']['wildcard']); $pconfig['dnsupdate_enable'] = isset($config['dnsupdate']['enable']); $pconfig['dnsupdate_host'] = $config['dnsupdate']['host']; $pconfig['dnsupdate_server'] = $config['dnsupdate']['server']; $pconfig['dnsupdate_ttl'] = $config['dnsupdate']['ttl']; if (!$pconfig['dnsupdate_ttl']) $pconfig['dnsupdate_ttl'] = 60; $pconfig['dnsupdate_keydata'] = $config['dnsupdate']['keydata']; $pconfig['dnsupdate_keyname'] = $config['dnsupdate']['keyname']; $pconfig['dnsupdate_keytype'] = $config['dnsupdate']['keytype']; if (!$pconfig['dnsupdate_keytype']) $pconfig['dnsupdate_keytype'] = "zone"; $pconfig['dnsupdate_usetcp'] = isset($config['dnsupdate']['usetcp']); if ($_POST) { unset($input_errors); $pconfig = $_POST; /* input validation */ $reqdfields = array(); $reqdfieldsn = array(); if ($_POST['enable']) { $reqdfields = array_merge($reqdfields, explode(" ", "host username password type")); $reqdfieldsn = array_merge($reqdfieldsn, explode(",", "Hostname,Username,Password,Service type")); } if ($_POST['dnsupdate_enable']) { $reqdfields = array_merge($reqdfields, explode(" ", "dnsupdate_host dnsupdate_ttl dnsupdate_keyname dnsupdate_keydata")); $reqdfieldsn = array_merge($reqdfieldsn, explode(",", "Hostname,TTL,Key name,Key")); } do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); if($pconfig['type'] <> "zoneedit") { if (($_POST['host'] && !is_domain($_POST['host']))) { $input_errors[] = "The host name contains invalid characters."; } } if (($_POST['mx'] && !is_domain($_POST['mx']))) { $input_errors[] = "The MX contains invalid characters."; } if (($_POST['username'] && !is_dyndns_username($_POST['username']))) { $input_errors[] = "The username contains invalid characters."; } if (($_POST['dnsupdate_host'] && !is_domain($_POST['dnsupdate_host']))) { $input_errors[] = "The DNS update host name contains invalid characters."; } if (($_POST['dnsupdate_ttl'] && !is_numericint($_POST['dnsupdate_ttl']))) { $input_errors[] = "The DNS update TTL must be an integer."; } if (($_POST['dnsupdate_keyname'] && !is_domain($_POST['dnsupdate_keyname']))) { $input_errors[] = "The DNS update key name contains invalid characters."; } if (!$input_errors) { $config['dyndns']['type'] = $_POST['type']; $config['dyndns']['username'] = $_POST['username']; $config['dyndns']['password'] = $_POST['password']; $config['dyndns']['host'] = $_POST['host']; $config['dyndns']['mx'] = $_POST['mx']; $config['dyndns']['wildcard'] = $_POST['wildcard'] ? true : false; $config['dyndns']['enable'] = $_POST['enable'] ? true : false; $config['dnsupdate']['enable'] = $_POST['dnsupdate_enable'] ? true : false; $config['dnsupdate']['host'] = $_POST['dnsupdate_host']; $config['dnsupdate']['server'] = $_POST['dnsupdate_server']; $config['dnsupdate']['ttl'] = $_POST['dnsupdate_ttl']; $config['dnsupdate']['keyname'] = $_POST['dnsupdate_keyname']; $config['dnsupdate']['keytype'] = $_POST['dnsupdate_keytype']; $config['dnsupdate']['keydata'] = $_POST['dnsupdate_keydata']; $config['dnsupdate']['usetcp'] = $_POST['dnsupdate_usetcp'] ? true : false; write_config(); $retval = 0; /* nuke the cache file */ config_lock(); services_dyndns_reset(); $retval = services_dyndns_configure(); $retval |= services_dnsupdate_process(); config_unlock(); $savemsg = get_std_save_message($retval); } } $pgtitle = "Services: Dynamic DNS client"; include("head.inc"); ?>

Dynamic DNS client onClick="enable_change(false)"> Enable
Service type
Hostname
Note:
Enter the complete host/domain name. example: myhost.dyndns.org
MX
Note: With DynDNS service you can only use a hostname, not an IP address.
Set this option only if you need a special MX record. Not all services support this.
Wildcards > Enable Wildcard
Username
Password
 
 
RFC 2136 Dynamic DNS updates onClick="enable_change(false)"> Enable
Hostname
Server
TTL seconds
Key name
This must match the setting on the DNS server.
Key type > Zone   > Host   > User
Key
Paste an HMAC-MD5 key here.
Protocol > Use TCP instead of UDP
 
  Note:
You must configure a DNS server in System: General setup or allow the DNS server list to be overridden by DHCP/PPP on WAN for dynamic DNS updates to work.