This is an old revision of the document!
====== Dynamic DNS Client configuration ====== The file /etc/config/ddns holds the configuration for ddns-scripts package. for ipv4 <code> config service "myddns_ipv4" option service_name "example.org" option domain "yourhost.example.org" option username "your_username" option password "your_password" option interface "wan" option ip_source "network" option ip_network "wan" </code> for ipv6 <code> config service "myddns_ipv6" option use_ipv6 "1" option service_name "example.org" option domain "yourhost.example.org" option username "your_username" option password "your_password" option interface "wan6" option ip_source "network" option ip_network "wan6" </code> ===== Sections ===== ==== Section "service" ==== ^ Name ^ Type ^ Required ^ Default ^ Description ^ | ''enabled'' | boolean | yes | '0' | disable(0) / enable(1) this service section. | | ''interface'' | network name | yes | //(none)// | The DDNS scripts use the Linux hotplug events system. When this specified network interface comes up, a related ifup hotplug event will cause DDNS script to start to monitor (and update) the external IP address of . Select the WAN interface that will have the external IP address to use in the DDNS registration. | | ''use_ipv6'' | boolean | no | '0' | no support of IPv6 protokoll.\\ decide if you want to update/send your current IPv4(0) or IPv6(1) address. | | ''service_name'' | string | yes(*) | //(none)// | Which DDNS online service do you use?\\ Choose one from ''/usr/lib/ddns/services'' file.\\ if ''option use_ipv6'' is enabled(1) choose a service from ''/usr/lib/ddns/services_ipv6'' file.\\ The latest versions can be downloaded from [[https://github.com/openwrt/packages/tree/master/net/ddns-scripts/files|Github.com]]\\ //**(*) If your DDNS provider is not listed there, remove this option and use '''option update_url''' or since CC 15.05 '''option update_script''' instead.**// | | ''update_url'' | string | yes(*) | //(none)// | Have a look at DDNS providers configuration help. Use the their URL here.\\ //**(*) Remove this option, if '''option service_name''' is set.**// | | ''update_script'' | string | no | //(none)// | ''/path/to/update_script.sh''\\ If your DDNS provider doesn't work with ddns-scripts, because there are additional parameters or other special thinks to be done, then you could write your own script to send updates to your DDNS provider.\\ Have a look into [[https://github.com/openwrt/packages/tree/master/net/ddns-scripts/samples|update_sample.sh]]\\ :!: Remove '''option service_name''' and use either this option **OR** '''option update_url'''. | | ''domain'' | string | yes | //(none)// | The DNS name / Hostname to update\\ //(this name must already be registered with the DDNS provider)//\\ :!: **If your DDNS provider don't need this information being send for update, put it in anyway. ''ddns-scripts'' use it to compare local IP with registered IP.** | | ''username'' | string | yes(*) | //(none)// | Username of your DDNS providers account\\ Have a look at DDNS providers help, because some providers are using different information as "username" for DDNS updates (i.e. hostname).\\ Look at [[doc:howto:ddns.client|DDNS client]] for additional information.\\ //**(*)If your DDNS provider don't need this information being send for update, put in an "X" instead.**// | | ''password'' | string | yes(*) | //(none)// | Password of your DDNS providers account\\ Have a look at DDNS providers help, because some providers are using different information as "password" for DDNS updates (i.e. tokenid).\\ Look at [[doc:howto:ddns.client|DDNS client]] for additional information.\\ //**(*)If your DDNS provider don't need this information being send for update, put in an "X" instead.**// | | ''use_https'' | boolean | no | '0' | disable(0) / enable(1) the use of HTTPS for secure communication with your DDNS provider.\\ //Some providers having problems, when not sending updates via HTTPS.//\\ **You must NOT specify 'http"s":', simply use 'http:' in ''update_url'' above, if used.**\\ :!: Needs "Wget" or "cURL" package being installed.\\ Look at [[doc:howto:ddns.client|DDNS client]] for additional information. | | ''cacert'' | string | no(*) | //(none)// | ''/path/to/certificates'' directory or ''/path/to/certificate.crt'' file.\\ Package "ca-certificates" installs certificates to ''/etc/ssl/certs'' directory.\\ Look at [[doc:howto:ddns.client|DDNS client]] for additional information.\\ //**(*)required, if ''option use_https'' set to '1'** (enabled)// \\ a value **'IGNORE'** is supported.\\ :!: This uses secure http for transfer, but do not verify the DDNS providers server certificate. **(insecure)** | | ''ip_source'' | string | yes | 'network' | Defines the source to determine you local IP send to the DDNS provider.\\ Valid values are:\\ - 'network' uses/needs '''option ip_network'''\\ - 'web' uses/needs '''option ip_url'''\\ - 'interface' uses/needs '''option ip_interface'''\\ - 'script' uses/needs '''option ip_script'''\\ See details below. | | ''ip_network'' | string | no(*) | 'wan' | Specify a network from your ''/etc/config/network'' file (e.g. "wan") with the "ip_network" option. If you specify "wan", you will send update with whatever the IP for your wan is.\\ //**(*)required, if ''option ip_source'' set to 'network'**// | | ''ip_url'' | string | no(*) | //(none)// | Detects the current local IP from specified webside that response with the IP address of calling host. If you are behind a firewall/NAT this is the best option since none of the local networks or interfaces will have the external IP.\\ The correct URL might depend on the DDNS provider being used. Check with the DDNS providers's documentation to determine, if they offer this feature and, if so, what the correct URL is.\\ Sample: [[http://checkip.dyndns.org/]] or [[http://checkipv6.dyndns.org/]]\\ //**(*)required, if value of ''option ip_source'' set to 'web'**// | | ''ip_interface'' | string | no(*) | //(none)// | Specify a locally installed physical (hardware) interfaces (e.g. 'eth1') to detect your current IP address, independent from network they configured to.\\ //**(*)required, if value of ''option ip_source'' set to 'interface'**// | | ''ip_script'' | string | no(*) | //(none)// | Useful, if you want to write your own script to detect your current local IP.\\ Put in full path '/path/to/script.sh'.\\ Have a look into [[https://github.com/openwrt/packages/tree/master/net/ddns-scripts/samples|getlocalip_sample.sh]] and [[doc:howto:ddns.ipscript|Get IP from modem scripts collection]] \\ :!: The script must be marked executable.\\ //**(*)required, if value of ''option ip_source'' set to 'script'**// | | ''check_interval'' | number | no | '10' | Defines the time interval to check if local IP has changed.\\ Accepted unit values: 'seconds' 'minutes' 'hours'.\\ :!: //Checks below 5 minutes make no sense, because the DNS Servers in Internet needs about 5 minutes to sync.\\ :!: either **both** options are set or not set.// | | ''check_unit'' | string | no | 'minutes' | ::: | | ''force_interval'' | number | no | '72' | Force to send an update to service provider, if no IP change was detected. Consult DDNS providers documentation, if your DDNS entry might timeout.\\ Accepted unit values: 'minutes' 'hours' 'days'\\ :!: //Minimum needs to be greater or equal check interval (see above).\\ :!: either **both** options are set or not set.//\\ a value **'0'** is supported. This will stop script execution after one successful update. | | ''force_unit'' | string | no | 'hours' | ::: | | ''retry_interval'' | number | no | '60' | If error happen on detecting, sending or updating, the script will retry the relevant action.\\ Here you define the time to wait before retry is started.\\ Accepted unit values: 'seconds' 'minutes'\\ :!: //either **both** options are set or not set.// | | ''retry_unit'' | string | no | 'seconds' | ::: | | ''retry_count'' | number | no | '0' | Number of retries before the script terminates execution, when a communication error happen.\\ :!: A setting of '0' will retry infinite. | | ''use_syslog'' | boolean | no | '0' | disable(0) / enable(1) logging events to syslog.\\ Level of events logged to syslog:\\ 0 == disable\\ 1 == info, notice, warning, errors\\ 2 == notice, warning, errors\\ 3 == warning, errors\\ 4 == errors\\ :!: Critical errors forcing ddns-scripts to stop are always logged to syslog. | | ''use_logfile'' | boolean | no | '1' | disable(0) / enable(1) logging to log file.\\ You find the file per default in /var/log/ddns/[sectionname].log\\ The path can be modified for **all** log files in section '''ddns''' (see below) | | ''dns_server'' | string | no | //(none)// | Normally the current (in the internet) registered ip is detected using the local defined name lookup policies (i.e. /etc/resolve.conf etc.)\\ Specify here a DNS server to be used instead of the defaults.\\ You can use FQDN, hostname or IP address. | | ''force_dnstcp'' | boolean | no | '0' | disable(0) / enable(1) DNS requests via TCP protocol.\\ By default every DNS call is made via UDP protocol. Some internet provider offer modems, caching UDP DNS requests. They redirect every request to external servers to local modem cache.\\ To force the usage of TCP for DNS requests enable this option.\\ :!: Needs BIND host package to be installed. | | ''proxy'' | string | no | //(none)// | If a Proxy is need to access HTTP/HTTPS pages on the WEB, it can be configured here also for sending updates to the DDNS provider.\\ If you configured ''option use_https '1''' above, you need to setup your HTTPS proxy here, otherwise your HTTP proxy.\\ :!: You should not detect your current IP (''option ip_source 'web''' above) because this request is also send via the configured proxy.\\ Syntax: [user:password@]proxy:port :!: port is required !\\ IPv6 address must be in squared brackets '[...]' | | ''force_ipversion'' | boolean | no | '0' | disable(0) / enable(1) this option.\\ Normally the system decide by various settings mostly compiled into the software, if it prefers IPv4 or IPv6 communication. Some DDNS providers update their DDNS record by using the IP address you send the update from.\\ Then you need to force the usage of the IP version you want to update or you want to force it for other reasons depending on your environment.\\ :!: Needs Wget or cURL package and BIND host package to be installed ! | | ''bind_network'' | string | no | //(none)// | Network to use for communication when detecting IP and sending updates.\\ :!: Needs Wget or cURL package to be installed !\\ Wget will bind to the IP and cURL to physical interface of given network. | | ''rec_id'' | string | no | //(none)// | If this is set and the service is CloudFlare, updates the specified record (useful when there are multiple records for the same domain). Determined automatically when not set (but in case of multiple records for the same domain one will be arbitrarily chosen). | | ''is_glue'' | boolean | no | '0' | This option is mandatory if the ddns record is a glue record and the registered ip should be compared against the glue record. This option requires bind host and does only work if the dns_server option is used. The dns_server value has to be the dns server where the glue record is defined.|