Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:services:ddns:client [2020/01/08 02:49] – Create a section Tunnel Broker oilervossdocs:guide-user:services:ddns:client [2024/10/05 13:46] – [dynu.com] andrewz
Line 1: Line 1:
-====== DDNS Client ======+====== DDNS client ====== 
 +See also: [[docs:guide-user:base-system:ddns|DDNS client configuration]]
  
 ===== Introduction ===== ===== Introduction =====
 +DDNS stands for [[wp>Dynamic_DNS|Dynamic DNS]].
 +Simply put, using this service gives a name to your IP.
 +So if you're hosting something on your line, people would not have to bother typing your IP.
 +They can just type in your domain name! It also helps when your IP changes.
 +Users won't need to discover what your new IP is, they can simply type your domain name.
  
-DDNS stands for [[wp>Dynamic_DNS|Dynamic DNS]]. Simply putusing this service gives a name to your IP. So if you're hosting something on your line, people would not have to bother typing your IPThey can just type in your domain name! It also helps when your IP changesUsers won't need to discover what your new IP is, they can simply type your domain name+This guide will help you configure your DDNS serviceso that your router auto-updates your IP to your DDNS provider. 
 +The simplest method possible would be through [[docs:guide-user:luci:luci.essentials|LuCI]].
  
-This guide will help you configure your DDNS service, so that your router auto-updates your IP to your DDNS provider. The simplest method possible would be through LuCI (the default webUI for OpenWrt). +OpenWrt uses [[packages:pkgdata:ddns-scripts]] which are shell scripts. 
- +There are other scripts and programs available in the web, also some DDNS providers offer their own programs. 
-OpenWrt uses [[packages:pkgdata_lede17_1:ddns-scripts|ddns-scripts]] which are [[wp>Bourne_shell|Bourne shell]] scripts.\\ +All of them are currently not ported and tested on OpenWrt.
-There are other scripts and programs available in the web, also some DDNS providers offer their own programs. All of them are currently not ported and tested on OpenWrt.+
  
 +===== Features =====
 +ddns-scripts support other special communication functions:
 +  * Run once, useful for usage with [[docs:guide-user:base-system:cron|cron]].
 +  * Set proxy with/without authentication for HTTP/HTTPS requests.
 +  * Set DNS server to use other than system default.
 +  * Binding to specific network if ''wget'' or to specific interface if ''curl'' installed.
 +  * Force the usage of either IPv4 or IPv6 communication only. Require either ''wget'' or ''curl'' AND ''bind-host''
 +  * DNS requests via TCP, require either ''wget'' or ''curl'' AND ''bind-host''.
  
 ===== Requirements ===== ===== Requirements =====
- +First of all, you'll need to pick and register a DNS name with a compatible DDNS service provider.
-First of all, you'll need to pick and register a DNS name with a compatible DynamicDNS service provider.\\+
 For a list of DDNS providers, see: For a list of DDNS providers, see:
-  * [[https://www.google.de/search?q=dynamic+dns+provider+list]]+  * [[https://www.google.com/search?q=dynamic+dns+provider+list]]
   * [[http://www.opendirectoryproject.org/Computers/Internet/Protocols/DNS/Service_Providers/Dynamic_DNS]]   * [[http://www.opendirectoryproject.org/Computers/Internet/Protocols/DNS/Service_Providers/Dynamic_DNS]]
-  * [[https://dnslookup.me/dynamic-dns/]]+  * Pick one from the list https://github.com/openwrt/packages/blob/master/net/ddns-scripts/files/usr/share/ddns/list
  
-^ //ddns-scripts// support the following Dynamic DNS service provider out of the box:  ^^^^ +^ //ddns-scripts// support the following Dynamic DNS service providers out of the box:                                                                                                                                                                                                                  ||||                                                         | 
-| [[http://3322.org/|3322.org]]  | [[http://afraid.org/|afraid.org]] <sup>6)</sup>  | [[http://changeip.com/|changeip.com]]  | [[http://cloudflare.com/|cloudflare.com]] <sup>2) 5) 6)</sup> +| [[http://3322.org/|3322.org]]                                                         | [[http://dnspark.com/|dnspark.com]]                        | [[http://easydns.com/|easydns.com]]                                                | [[http://mythic-beasts.com/|mythic-beasts.com]] <sup>6)</sup>  | servercow.de                                            
-| [[http://core-networks.de/|core-networks.de]] <sup>6)</sup>  [[http://ddnss.de/|ddnss.de]] <sup>6)</sup>  | [[http://dhis.org/|dhis.org]] <sup>6)</sup>  | [[http://dnsdynamic.org/|dnsdynamic.org]]  +| [[http://afraid.org/|afraid.org]] <sup>6)</sup>                                       dnsever.com                                                | [[http://editdns.net/|editdns.net]]                                                | [[http://namecheap.com/|namecheap.com]]                        | simply.com                                              
-| [[http://dnsexit.com/|dnsexit.com]]  | [[http://dnshome.de/|dnshome.de]] <sup>6)</sup>  | [[http://dnsmax.com/|dnsmax.com]]  | [[http://dnsomatic.com/|dnsomatic.com]]  +| all-inkl.com                                                                          | [[http://do.de/|do.de]] <sup>6)</sup>                      | [[http://goip.de/|goip.de]] <sup>6)</sup>                                          | [[http://nettica.com/|nettica.com]]                            | [[http://sitelutions.com/|sitelutions.com]]             
-| [[http://dnspark.com/|dnspark.com]]  | [[http://do.de/|do.de]] <sup>6)</sup>  [[http://dtdns.com/|dtdns.com]]  | [[http://duckdns.org/|duckdns.org]] <sup>6)</sup> +| [[http://changeip.com/|changeip.com]]                                                 | domopoli.de                                                | [[http://domains.google.com/|google.com]] <sup>5) 6)</sup>                         njal.la                                                        | [[http://spdyn.de/|spdyn.de]] <sup>6)</sup> (spdns.de)  | 
-| [[http://duiadns.net/|duiadns.net]] <sup>6)</sup>  | [[http://dy.fi/|dy.fi]]  | [[http://dyndns.org/|dyndns.org]] <sup>6)</sup> (dyn.com)  | [[http://dyndnss.net/|dyndnss.net]]  +| [[http://cloudflare.com/|cloudflare.com]] <sup>2) 5) 6)</sup>                         | [[http://dtdns.com/|dtdns.com]]                            | [[http://dns.he.net/|dns.he.net]] <sup>6)</sup>                                    | now-dns.com                                                    | [[http://strato.com/|strato.com]]                       
-| dyns.net  | dynsip.org  | [[http://dynu.com/|dynu.com]]  | [[http://dynv6.com/|dynv6.com]] <sup>6)</sup>  | +| [[http://core-networks.de/|core-networks.de]] <sup>6)</sup>                           | [[http://duckdns.org/|duckdns.org]] <sup>6)</sup>          | [[https://he.net|he.net]]                                                          | [[http://no-ip.com/|no-ip.com]] <sup>1)</sup> (noip.com)       | [[http://system-ns.com/|system-ns.com]]                 | 
-| [[http://easydns.com/|easydns.com]]  | [[http://editdns.net/|editdns.net]]  | [[http://goip.de/|goip.de]] <sup>6)</sup>  | [[http://domains.google.com/|google.com]] <sup>5) 6)</sup>  | +| [[http://ddnss.de/|ddnss.de]] <sup>6)</sup>                                           | [[http://duiadns.net/|duiadns.net]] <sup>6)</sup>          | [[https://hosting.de|hosting.de]]                                                  | [[http://no-ip.pl/|no-ip.pl]] <sup>6)</sup>                    [[http://thatip.com/|thatip.com]]                       | 
-| [[http://dns.he.net/|he.net]] <sup>6)</sup>  | [[http://joker.com/|joker.com]]  | [[http://loopia.se/|loopia.se]] <sup>6)</sup> ([[http://loopia.com/|loopia.com]])  | [[http://mydns.jp/|mydns.jp]] <sup>6)</sup>  | +| ddo.jp                                                                                | [[http://dy.fi/|dy.fi]]                                    infomaniak.com                                                                     | [[http://nsupdate.info/|nsupdate.info]] <sup>6)</sup>          transip.nl                                              | 
-| [[http://myonlineportal.net/|myonlineportal.net]] <sup>6)</sup>  [[http://mythic-beasts.com/|mythic-beasts.com]] <sup>6)</sup>  | [[http://namecheap.com/|namecheap.com]]  | [[http://nettica.com/|nettica.com]]  +| desec.io                                                                              | dyndns.it                                                  | ipnodns.ru                                                                         | [[http://nubem.com/|nubem.com]]                                | [[http://twodns.de/|twodns.de]]                         
-| [[http://no-ip.com/|no-ip.com]] <sup>1)</sup> (noip.com)  | [[http://no-ip.pl/|no-ip.pl]] <sup>6)</sup>  | [[http://nsupdate.info/|nsupdate.info]] <sup>6)</sup>  | [[http://nubem.com/|nubem.com]]  +| [[http://dhis.org/|dhis.org]] <sup>6)</sup>                                           | [[http://dyndns.org/|dyndns.org]] <sup>6)</sup> (dyn.com)  | [[https://inwx.de|inwx.de]]                                                        | [[http://ovh.com/|ovh.com]]                                    | udmedia.de                                              
-| [[http://ovh.com/|ovh.com]]  | [[http://regfish.de/|regfish.de]] <sup>6)</sup>  | [[http://schokokeks.org/|schokokeks.org]]  | [[http://selfhost.de/|selfhost.de]]  | +| [[http://dnsdynamic.org/|dnsdynamic.org]]                                             | [[http://dyndnss.net/|dyndnss.net]]                        | [[http://joker.com/|joker.com]]                                                    | opendns.com                                                    | [[http://variomedia.de/|variomedia.de]] <sup>6)</sup>   | 
-[[http://sitelutions.com/|sitelutions.com]]  | [[http://spdyn.de/|spdyn.de]] <sup>6)</sup> (spdns.de)  | [[http://strato.com/|strato.com]]  | [[http://system-ns.com/|system-ns.com]]  +| [[http://dnsexit.com/|dnsexit.com]]                                                   | dyns.net                                                   | [[http://loopia.se/|loopia.se]] <sup>6)</sup> ([[http://loopia.com/|loopia.com]] | oray.com                                                       | xlhost.de                                               | 
-| [[http://thatip.com/|thatip.com]]  | [[http://twodns.de/|twodns.de]]  | [[http://variomedia.de/|variomedia.de]] <sup>6)</sup>  | [[http://zerigo.com/|zerigo.com]] <sup>6)</sup>  +| [[http://dnshome.de/|dnshome.de]] <sup>6)</sup>                                       | dynsip.org                                                 | moniker.com                                                                        | [[http://regfish.de/|regfish.de]] <sup>6)</sup>                | [[http://zoneedit.com/|zoneedit.com]] <sup>5)</sup>     
-| [[http://zoneedit.com/|zoneedit.com]] <sup>5)</sup>  | [[http://www.zzzz.io/|zzzz.io]] <sup>5) 6)</sup>  | | BIND nsupdate <sup>3) 4) 6)</sup>  |+| [[http://dnsmax.com/|dnsmax.com]]                                                     | [[http://dynu.com/|dynu.com]]                              | [[http://mydns.jp/|mydns.jp]] <sup>6)</sup>                                        | [[http://schokokeks.org/|schokokeks.org]]                      | BIND nsupdate <sup>3) 4) 6)</sup>                       
 +| [[http://dnsomatic.com/|dnsomatic.com]]                                               | [[http://dynv6.com/|dynv6.com]] <sup>6)</sup>              [[http://myonlineportal.net/|myonlineportal.net]] <sup>6)</sup>                    | [[http://selfhost.de/|selfhost.de]]                            |                                                         |
  
-<sup>1)</sup> requires additional package //ddns-scripts_no-ip_com// to be installed.\\ +  - Requires additional package [[packages:pkgdata:ddns-scripts-noip]] to be installed. 
-<sup>2)</sup> needs additional package //ddns-scripts_cloudflare// to be installed.\\ +  - Needs additional package [[packages:pkgdata:ddns-scripts-cloudflare]] to be installed. 
-<sup>3)</sup> directly updates a PowerDNS (or maybe bind server) via nsupdate.\\ +  - Directly updates a DNS server (Bind, PowerDNS, Knot) via nsupdate (RFC 2136)
-<sup>4)</sup> needs additional package //ddns-scripts_nsupdate// and ''bind-client'' to be installed.\\ +  - Needs additional package [[packages:pkgdata:ddns-scripts-nsupdate]] and [[packages:pkgdata:bind-client]] to be installed. 
-<sup>5)</sup> SSL support required.\\ +  - Requires SSL support. 
-<sup>6)</sup> support IPv6+  - Supports IPv6.
  
-If you have picked a DDNS service provider and create your host/domain name you need to note additional your username and password.\\ +If you have picked a DDNS service provider and create your host/domain name you need to note additional your username and password. 
-Now you need to decide if you want to use secure communication with your DDNS provider or not.\\ +Now you need to decide if you want to use secure communication with your DDNS provider or not. 
-Some provider require secure ([[wp>HTTPS|HTTPS]]communication. Read their help pages for details and also read provider specific informations below.+Some provider require secure [[wp>HTTPS|HTTPS]] communication. 
 +Read their help pages for details and also read provider specific information below.
  
 +===== Web interface instructions =====
 +Set up DDNS client service using web interface.
 +  - Navigate to **LuCI -> System -> Software**
 +  - Press the button **Update Lists** to update internal lists of available packages.
 +  - Install the packages [[packages:pkgdata:ddns-scripts]] and [[packages:pkgdata:luci-app-ddns]] to provide DDNS client service and web interface.
 +  - Install the packages [[packages:pkgdata:wget-ssl]] and [[packages:pkgdata:ca-certificates]], or [[packages:pkgdata:curl]] and [[packages:pkgdata:ca-bundle]] for SSL support.
 +  - Install the provider specific packages ''ddns-scripts_*'' and LuCI language packages ''luci-i18n-ddns-*''.
 +  - Refresh the page and navigate to **LuCI -> Services -> Dynamic DNS**.
 +  - Use the instances ''myddns_ipv4'' and ''myddns_ipv6'' or delete them and define your own.
 +  - Modify the fields you need to change and check the **Enabled** option.
 +  - Click **Save & Apply** button to save changes.
  
-===== Support ===== +===== Command-line instructions ===== 
-If you need support, found an issue or only want to request a new extension for the next release, please post your questions/issues/requests here: **(Don't forget to post informations about your used software versions.)** +Install ''ddns-scripts'' and the provider-specific packages ''ddns-scripts_xxxxx''. 
-   * [[https://forum.openwrt.org/|OpenWrt Forum]] +Also provide SSL support with ''wget'' and ''ca-certificates'', or ''curl'' and ''ca-bundle''.
-   * [[https://github.com/openwrt/packages/issues|Github-OpenWrt-Packages]] for //ddns-scripts// +
-   * [[https://github.com/openwrt/luci/issues|Github-OpenWrt-LuCI]] for //luci-app-ddns//+
  
-A full list of supported settings (some not supported by LuCI webUI): +<code bash>
-   * UCI documentation -> [[docs:guide-user:base-system:ddns|Dynamic DNS Client configuration]] +
- +
-The source code is available at GitHub: +
-|  CC 15.05  | [[https://github.com/openwrt/packages/tree/for-15.05/net/ddns-scripts|ddns-scripts_2.4.3-1]]  | [[https://github.com/openwrt/luci/tree/for-15.05/applications/luci-app-ddns| luci-app-ddns_2.2.4-1]] +
-|  trunk  | [[https://github.com/openwrt/packages/tree/master/net/ddns-scripts|ddns-scripts]]  | [[https://github.com/openwrt/luci/tree/master/applications/luci-app-ddns|luci-app-ddns]] +
- +
-===== Installation ===== +
-==== using LuCI ==== +
-  * Login into your router through your browser. +
-  * From the menu select '''System''' -> '''Software''' +
-  * Press button [Update Lists] to update internal lists of available packages. +
-  * Filter for //ddns// and install //luci-app-ddns// package. Installing the package //luci-app-ddns// will automatically install the package //ddns-scripts//+
-  * You might need to install provider specific packages //ddns-scripts_xxxxx// and LuCI language packages //luci-i18n-ddns-xx//+
-  * After //luci-app-ddns// (and other packages) are installed, just press any other menu entry on the LuCI webUI, and the page will refresh itself and it will appear in the menu under '''Services''' -> '''%%Dynamic DNS%%'''+
- +
-==== via console ==== +
-To install //ddns-scripts// use the [[docs:guide-user:additional-software:opkg|OPKG Package Manager]]\\ +
-You might need to install provider specific packages //ddns-scripts_xxxxx// +
-<code|root@OpenWrt:/#>+
 opkg update opkg update
 opkg install ddns-scripts opkg install ddns-scripts
 opkg install ddns-scripts_xxxxx opkg install ddns-scripts_xxxxx
 +opkg install wget ca-certificates
 +opkg install curl ca-bundle
 </code> </code>
  
-==== SSL support ==== +Proceed with setting up the service using the UCI commands.
- +
-By default //ddns-scripts// uses BusyBox built-in '''wget''' for DDNS updates over http, which does not support https (SSL). \\  +
-To perform DDNS updates over https (SSL), you will need to install the '''wget''' or '''curl''' package, and add the appropriate root certificate for your ddns provider. +
- +
-If both '''wget''' and '''curl''' are installed you can configure which one to prefer. Default is '''wget'''+
- +
-You can install either via LuCI (from the menu select 'System' → 'Software') and search for '''wget''' or '''curl'''\\ +
-or install via console using following commands+
-<code|root@OpenWrt:/#> +
-opkg update +
-opkg install wget     # normally you only need +
-opkg install curl     # either wget or curl +
-opkg install ca-certificates +
-</code> +
- +
-:!: If you, also for other software, need all certificates in one file or you want to update CA certificates regulary, then do **NOT** install '''ca-certificates''' package.\\ +
-'''ca-certificate''' package is not always backported to older OpenWrt versions. +
-Install latest CA certificates (in one file) using console: +
-<code|root@OpenWrt:/#> +
-mkdir -p -m0755 /etc/ssl/certs +
-curl -o /etc/ssl/certs/ca-certificates.crt http://curl.haxx.se/ca/cacert.pem   # using curl +
-wget  --no-check-certificate -O /etc/ssl/certs/ca-certificates.crt http://curl.haxx.se/ca/cacert.pem   # using wget +
-</code> +
- +
-**__Since OpenWrt 18.06.0 (and earlier?)__**\\ +
-Wget works with ''ca-certificates'' package, but curl does not. Instead install ''ca-bundle'', if you wish to use curl (but not wget). +
- +
-==== other functions ==== +
-FIXME //This does not belong to the Installation section. Move it to where it better fits the context.//  --- //[[tmo26@gmx.de|tmomas]] 2017/04/24 01:05// +
- +
-//ddns-scripts// support other special communication functions to be used: +
-  * Run once (useful for usage with ''crond''+
-  * Set proxy with/without authenfication for http/https requests +
-  * Set DNS server to use other than system default +
-  * Binding to specific network if ''wget'' or to specific interface if ''curl'' installed. +
-  * Force the usage of either IPv4 or IPv6 communication only. Require either ''wget'' or ''curl'' AND ''bind-host''+
-  * DNS requests via TCPRequire either ''wget'' or ''curl'' AND ''bind-host'' !+
  
 ===== Configuration ===== ===== Configuration =====
-==== Basics ==== +ddns-scripts are designed to update one host per configuration/section. 
-ddns-scripts are designed to update one host per configuration/section.\\ +To update multiple hosts or providers or IPv4 and IPv6 for the same host you need to define separate configurations/sections. 
-To update multiple hosts or providers or IPv4 and IPv6 for the same host you need to define separate configurations/sections.\\ +Some providers offer to update multiple host within one update request. 
-Some providers offer to update multiple host within one update request. A possible solution for this option is to use ''--custom--'' service name settings.\\ +A possible solution for this option is to use ''%%--custom--%%'' service name settings. 
-Have a look at [[#provider_specifics|Provider specifics]].+Have a look at [[#provider_specifics|provider specifics]].
  
-The main settings you need to set are (all other normally work fine with the defaults):\\ +==== Web interface instructions ==== 
-|  Service name the DDNS service provider to use  +The main settings you need to set: 
- Host/Domain your [[wp>Fully_qualified_domain_name|FQDN]] you want to update (used by //ddns-scripts// using nslookup to check if update has happen)  +|  DDNS Service provider Service provider name as it is known to OpenWrt                                                                                                                                                           
- Username | username or other parameter to use as username (send urlencoded +       Lookup Hostname The [[wp>Fully_qualified_domain_name|FQDNs]] you want to update, script will make DNS queries against it to check if IP address update is needed                                                          
- Password | password or other parameter to use as password (send urlencoded)\\ :!: **__including BB 14.07__** Ensure this password does not have "$1" or $ with any number following in it, as this breaks the script. +                Domain | Usually the same as Lookup Hostname, script will include this name into the update request sent to provider                                                                                               | 
- Interface | network name (i.e. wan, wan6) used by OpenWrt hotplug event system to start //ddns-scripts//  |+|               Username | Username or other parameter used for authentication in update request (will be sent URL-encoded                                                                                                         
 +              Password | Password or other parameter (like token) used for authentication in update request (will be sent URL-encoded)\\ :!: Ensure this password does not have have ''$'' characters, as this breaks the script. 
 +             Interface | Network name used by OpenWrt hotplug event system to start //ddns-scripts//, e.g. ''wan'', ''wan6''                                                                                                       |
  
-:!: **__since DD (trunk)__** the following main settings need to be set:\\ +  It is not allowed to use ''dash''-sign "-" inside configuration/section names. 
- Service name | the DDNS service provider to use  | +  A full list of supported settings (some not supported by LuCIyou will find in [[docs:guide-user:base-system:ddns|UCI documentation]]. 
- Lookup Host | ONE of your defined [[wp>Fully_qualified_domain_name|FQDN]] you want to update (used by //ddns-scripts// using nslookup to check if update has happen)  | +  Always keep in mind the [[#provider_specifics|Provider specific]] settings if there are any. 
- Host/Domain | mostly same as '''Lookup Host''', but now can also be used as "normal" parameter. i.e. as list of hosts to be updated +  * Don't forget to enable your configuration/section. 
-|  Username | username or other parameter to use as username (send urlencoded) +  * You need minimum one enabled configuration/section for //ddns// service to start. 
-|  Password | password or other parameter to use as password (send urlencoded) +  * You need to enable //ddns// service to enable updates being sent on reboot and hotplug events. 
-|  Interface | network name (i.e. wan, wan6) used by OpenWrt hotplug event system to start //ddns-scripts//  |+  * Do not change the files ''/usr/lib/ddns/services'' or ''/usr/lib/ddns/services_ipv6'' as they can be overwritten by system and package updates.
  
-After fresh installation a configuration/section '''myddns''' and '''myddns_ipv4''' and '''myddns_ipv6''' exists ready to be modified for your needs.\\ +=== SSL support === 
-You could delete them and define your own.\\+Options to configure HTTPS communication are only available if ''wget'' or ''curl'' package is installed.
  
-{{:meta:icons:tango:dialog-warning.png?nolink&32x32}}  **Please heed the following important hints:** +  Check **Use HTTP Secure** option. Additional field **Path to CA-Certificate** is shown with it's default setting. 
-  *** It is NOT allowed to use ''dash''-sign "-" inside configuration/section names.** +    * If you have installed ''ca-certificates'' package leave the shown default ''/etc/ssl/certs''
-  ***A full list of supported settings (some not supported by LuCI webUI) you will find in [[docs:guide-user:base-system:ddns|UCI documentation]]!** +    If you have installed CA certificates in one file from [[#ssl_support|above]] set the value to ''/etc/ssl/certs/ca-certificates.crt''. 
-  ***Always keep in mind the [[#provider_specifics|Provider specific]] settings if there are any!** +    If you like to use other certificate you need to set here the full path to the certificate including file namee.g. ''/path/to/file.crt''
-  ***Don't forget to enable your configuration/section!** +    * If your certificates are stored in a different path, set here the path where your certificates are located, e.g. ''/path/to/files''
-  ***You need minimum one enabled configuration/section for //ddns// service to start!** +  Click **Save & Apply** button to save changes.
-  ***You need to enable //ddns// service to enable updates being sent on reboot and hotplug events!** +
-  ***__//Although described elsewhereit is not recommended to change the files '''/usr/lib/ddns/services''' or '''/usr/lib/ddns/services_ipv6''' because they will be overwritten during system and package updates!//__**+
  
-==== using LuCI ==== +=== Custom service ===
-  * Login into your router through your browser. +
-  * From the menu select '''Services''' -> '''%%Dynamic DNS%%'''+
-  * Navigate to the configuration/section you like to change. +
-  * Modify the fields you need to change. +
-  * Don't forget to check the '''Enabled''' option! +
-  * Click [Save & Apply] button to save changes. +
- +
-To add a new configuration/section:\\ +
-  * Type the new name into the text entry box at the bottom of the page next to [Add] button.\\ :!: **Do not use a ''dash'' character "-" in configuration/section name!** +
-  * Click [Add] button. +
-  * Modify the fields you need to change. +
-  * Don't forget to check the '''Enabled''' option! +
-  * Click [Save & Apply] button to save changes. +
- +
-'''Username''' and '''Password''' fields are required fields. If your provider does not require one or both of them, simply put in a character of your choice. +
- +
-:!: **You need to enable ddns service!**\\ +
-From the menu select '''System''' -> '''Startup'''.\\ +
-Set //ddns// service to enabled. +
- +
-=== SSL Support === +
-Options to configure HTTPS communication are only available if ''wget'' or ''curl'' package is installed. (See ''Hints'' if shown.) +
- +
-  * Check '''Use HTTP Secure''' option. Additional field '''Path to CA-Certificate''' is shown with it's default setting. +
-    * If you have installed ''ca-certificates'' package leave the shown default! (''/etc/ssl/certs''+
-    * If you have installed CA certificates in one file from [[#ssl_support|above]] set the value to: ''/etc/ssl/certs/ca-certificates.crt'' +
-    * If you like to use other certificate you need to set here the full path to the certificate including file name. (''/path/to/file.crt''+
-    * If your certificates are stored in a different path, set here the path where your certificates are located. (''/path/to/files''+
-  * Click [Save & Apply] button to save changes. +
- +
-=== Custom Service ===+
 If you want to use a DDNS provider currently not listed or you want to update multiple hosts within one configuration/section then you should do the following: If you want to use a DDNS provider currently not listed or you want to update multiple hosts within one configuration/section then you should do the following:
-  * Choose '''--custom--''' as service. Additional field '''%%Custom update-URL%%''' is shown. +  * Choose ''%%--custom--%%'' as service. Additional field **Custom update-URL** is shown. 
-  * Fill in the URL you like to use. :!: Please read URL syntax description [[#custom_service1|below]]. Also have a look at [[#provider_specifics|Provider specifics]]. +  * Fill in the URL you like to use. :!: Please read URL syntax description [[#custom_service1|below]]. Also have a look at [[#provider_specifics|provider specifics]]. 
-  * Click [Save & Applybutton to save changes.+  * Click **Save & Apply** button to save changes.
  
 :!: **If you found a DDNS provider not listed or with additional IPv6 support or with changed update URL please open an issue at [[https://github.com/openwrt/packages|Github-OpenWrt-Packages]] so it can be included with the next release.** :!: **If you found a DDNS provider not listed or with additional IPv6 support or with changed update URL please open an issue at [[https://github.com/openwrt/packages|Github-OpenWrt-Packages]] so it can be included with the next release.**
  
-==== via console ==== +==== Command-line instructions ==== 
-The easiest way to configure //ddns-scripts// via console is to edit the file ''/etc/config/ddns'' directly using build-in [[wp>Vi|vi editor]] or any other editor you prefer. Other editors as ''vi'' needs to be installed separately.+The easiest way to configure //ddns-scripts// via console is to edit the file ''/etc/config/ddns'' directly using build-in [[wp>Vi|vi editor]] or any other editor you prefer. 
 +Other editors as ''vi'' needs to be installed separately.
  
 A configuration/section looks like: A configuration/section looks like:
-<code|/etc/config/ddns>+ 
 +<code bash> 
 +/etc/config/ddns
 config 'service' 'myddns' config 'service' 'myddns'
  option 'service_name' 'example.org'  option 'service_name' 'example.org'
Line 206: Line 148:
 </code> </code>
  
-Alternatively you can use [[docs:guide-user:base-system:uci#command_line_utility|UCI command line interface]].\\+Alternatively you can use [[docs:guide-user:base-system:uci#command_line_utility|UCI command line interface]].
 Example input: Example input:
-<code|root@OpenWrt:/#+ 
-uci set ddns.myddns.service_name="ddnsprovider.com" # only use names listed in /usr/lib/ddns/services +<code bash
 +uci set ddns.myddns.service_name="ddnsprovider.com" # only use names listed in /usr/lib/ddns/services
  # or /usr/lib/ddns/services_ipv6 (since CC 15.05)  # or /usr/lib/ddns/services_ipv6 (since CC 15.05)
 uci set ddns.myddns.domain="host.yourdomain.net" uci set ddns.myddns.domain="host.yourdomain.net"
Line 220: Line 163:
  
 ''ddns.myddns.enabled="1"'' means: ''ddns.myddns.enabled="1"'' means:
-  * '''ddns''' is the configuration file to change (here ''/etc/config/ddns''+  * ''ddns'' is the configuration file to change (here ''/etc/config/ddns''
-  * '''myddns''' is the configuration/section to change +  * ''myddns'' is the configuration/section to change 
-  * '''enabled''' is the option to set/change+  * ''enabled'' is the option to set/change
   * behind the ''equal''-sign is the value to set. :!: Set ''single''- or ''double''-quotes around the value and no space or whitespace around the ''equal''-sign.   * behind the ''equal''-sign is the value to set. :!: Set ''single''- or ''double''-quotes around the value and no space or whitespace around the ''equal''-sign.
  
 Example to create/add a new configuration/section "newddns": Example to create/add a new configuration/section "newddns":
-<code|root@OpenWrt:/#>+ 
 +<code bash>
 uci set ddns.newddns="service" uci set ddns.newddns="service"
 uci set ddns.newddns.service_name="ddnsprovider.com" # only use names listed in /usr/lib/ddns/services uci set ddns.newddns.service_name="ddnsprovider.com" # only use names listed in /usr/lib/ddns/services
Line 236: Line 180:
 uci set ddns.newddns.enabled="1" uci set ddns.newddns.enabled="1"
 uci commit ddns # don't forget this, otherwise data not written to configuration file uci commit ddns # don't forget this, otherwise data not written to configuration file
 +/etc/init.d/ddns restart
 </code> </code>
  
-:!: **You need to enable //ddns// service by:** +=== SSL support === 
-<code|root@OpenWrt:/#> +You need to add the following entries to the desired section in ''/etc/config/ddns'' file using ''ca-certificates'' package:
-/etc/init.d/ddns enable +
-</code>+
  
-=== SSL Support === +<code bash> 
- +/etc/config/ddns
-You need to add the following entries to the desired section in '''/etc/config/ddns''' file:\\ +
-using '''ca-certificates''' package: +
-<code|/etc/config/ddns>+
 config 'service' 'myddns' config 'service' 'myddns'
  ...  ...
Line 253: Line 193:
  option 'cacert' '/etc/ssl/certs'  option 'cacert' '/etc/ssl/certs'
 </code> </code>
 +
 using single file (ie. as descriped [[#ssl_support|above]]): using single file (ie. as descriped [[#ssl_support|above]]):
-<code|/etc/config/ddns>+ 
 +<code bash> 
 +/etc/config/ddns
 config 'service' 'myddns' config 'service' 'myddns'
  ...  ...
Line 262: Line 205:
 </code> </code>
  
-Above options can also be set via LuCI webUI.\\ +Above options can also be set via LuCI. 
-The options are only shown if '''wget''' or '''curl''' package is installed!+The options are only shown if ''wget'' or ''curl'' package is installed!
  
-=== Custom Service === +=== Custom service === 
-Following changes need to be done if you use a DDNS provider currently not listed or to update multiple hosts within one configuration/section.\\ +Following changes need to be done if you use a DDNS provider currently not listed or to update multiple hosts within one configuration/section. 
-Edit '''/etc/config/ddns''' +Edit ''/etc/config/ddns''
-<code|/etc/config/ddns>+ 
 +<code bash> 
 +/etc/config/ddns
 config 'service' 'myddns' config 'service' 'myddns'
  ...  ...
Line 274: Line 219:
  option 'update_url' 'http://your.update.url...[USERNAME]...[PASSWORD]...[DOMAIN]...[IP]'  option 'update_url' 'http://your.update.url...[USERNAME]...[PASSWORD]...[DOMAIN]...[IP]'
 </code> </code>
 +
 or use UCI command line interface or use UCI command line interface
-<code|root@OpenWrt:/#>+ 
 +<code bash>
 uci delete ddns.myddns.service_name uci delete ddns.myddns.service_name
 uci set ddns.myddns.update_url="http://your.update.url...[USERNAME]...[PASSWORD]...[DOMAIN]...[IP]" uci set ddns.myddns.update_url="http://your.update.url...[USERNAME]...[PASSWORD]...[DOMAIN]...[IP]"
Line 282: Line 229:
  
 == URL Syntax == == URL Syntax ==
-:!: It's not needful to set '''https:%%//%%'''. If SSL support is activated '''http:%%//%%''' is replaced automatically.\\ +  * No need to set ''%%https://%%'', it is replaced automatically if SSL support is activated. 
-:!: The entries [USERNAME] [PASSWORD] [DOMAIN] [IP] are replaced by //ddns-scripts// just before update.\\ +  The entries [USERNAME] [PASSWORD] [DOMAIN] [IP] are replaced by //ddns-scripts// just before update. 
-[USERNAME] is replaced by content of '''option username''' from configuration file.\\ +  [USERNAME] is replaced by content of ''option username'' from configuration file. 
-[PASSWORD] is replaced by content of '''option password''' from configuration file.\\ +  [PASSWORD] is replaced by content of ''option password'' from configuration file. 
-[DOMAIN] is replaced by content of '''option domain''' from configuration file.\\ +  [DOMAIN] is replaced by content of ''option domain'' from configuration file. 
-[IP] is replaced by the current IP address of your OpenWrt system.+  [IP] is replaced by the current IP address of your OpenWrt system.
  
-:!: carefully set '''option domain''' in your configuration. This option is also used to detect if the update was successfully done.\\ :!: This entry is the DNS name your OpenWrt system will be reachable from the internet.\\ +  * Carefully set ''option domain'' in your configurationalso used to detect if the update was successfully done. 
-:!: Have a look at [[#provider_specifics|Provider specifics]] for samples.\\+  * This entry is the DNS name your OpenWrt system will be reachable from the internet. 
 +  Have a look at [[#provider_specifics|Provider specifics]] for samples.
  
 :!: **If you found a DDNS provider not listed or with additional IPv6 support or with changed update URL please open an issue at [[https://github.com/openwrt/packages|Github-OpenWrt-Packages]] so it can be included with the next release.** :!: **If you found a DDNS provider not listed or with additional IPv6 support or with changed update URL please open an issue at [[https://github.com/openwrt/packages|Github-OpenWrt-Packages]] so it can be included with the next release.**
  
-==== Detecting public IP ====+==== Detecting WAN IP ==== 
 +Here a list (without preferences) of URLs to detect your current public ip used by your system: 
 +^ Dual-Stack ^ IPv4-only ^ IPv6-only ^ Server Location ^ 
 +| http://checkip.dns.he.net/ | - | - | US | 
 +| http://checkip.freedyn.org/ | - | - | DE | 
 +| http://bot.whatismyipaddress.com/ | - | - | US | 
 +| http://whatismyip.org/ | - | - | US | 
 +| http://myexternalip.com/raw | - | - | DE |php 
 +| http://wtfismyip.com/text | http://ipv4.wtfismyip.com/text | http://ipv6.wtfismyip.com/text | US | 
 +| http://domains.google.com/checkip | - | - | part of Google | 
 +| http://icanhazip.com/ | http://ipv4.icanhazip.com/ | http://ipv6.icanhazip.com/ | US | 
 +| http://checkip.feste-ip.net/ | http://v4.checkip.feste-ip.net/ | http://v6.checkip.feste-ip.net/ | DE | 
 +| http://ident.me/ | http://ipv4.ident.me/ | http://ipv6.ident.me/ | UK | 
 +| http://ddnss.de/meineip.php | http://ip4.ddnss.de/meineip.php | http://ip6.ddnss.de/meineip.php | DE | 
 +| http://checkip.spdyn.de/ | http://checkip4.spdyn.de/ | http://checkip6.spdyn.de/ | DE | 
 +| http://ifcfg.me/ip | http://4.ifcfg.me/ip | http://6.ifcfg.me/ip | FR | 
 +| http://nsupdate.info/myip | http://ipv4.nsupdate.info/myip | http://ipv6.nsupdate.info/myip | DE | 
 +| http://checkip.zerigo.com | http://checkip4.zerigo.com/ | http://checkip6.zerigo.com/ | US | 
 +| - | http://checkip.dyndns.com/ <sup>1)</sup> | http://checkipv6.dyndns.com/ <sup>1)</sup> | US + UK | 
 +| - | http://checkip.dyndns.com:8245/ | http://checkipv6.dyndns.com:8245/ | US + UK | 
 +| - | http://checkip.dyn.com/ <sup>1) 2)</sup> | http://checkipv6.dyn.com/ <sup>1) 2)</sup> | US + UK | 
 +| - | http://ipv4.myip.dk/api/info/IPv4Address | http://ipv6.myip.dk/api/info/IPv6Address | US | 
 +| - | http://ipv4.ipogre.com/linux.php | http://ipv6.ipogre.com/linux.php | US | 
 +| - | http://v4.ipv6-test.com/api/myip.php | http://v6.ipv6-test.com/api/myip.php | FR | 
 +| - | http://ipecho.net/plain | - | NL | 
 +| - | http://ipinfo.io/ip | - | part of Amazon AWS | 
 +| - | http://ifconfig.me/ip | - | JP | 
 +| - | http://checkip.amazonaws.com | - | part of Amazon AWS | 
 +| - | http://myip.dtdns.com | - | US | 
 +| - | http://ip.changeip.com | - | US | 
 +| - | http://freedns.afraid.org/dynamic/check.php | - | ? | 
 +| - | http://freedns.afraid.org:8080/dynamic/check.php | - | ? |
  
-Here a list (without preferences) of url's to detect your current public ip used by your system: + Users reported timeout problems, use links in the line below (...:8245). 
-^ Dual-Stack  ^ IPv4-only  ^ IPv6-only  ^ Server Location + Alias of *.dyndns.com.
-| http://checkip.dns.he.net/         | —  | —  | US  | +
-| http://checkip.freedyn.org/        | —  | —  | DE  | +
-| http://bot.whatismyipaddress.com/  | —  | —  | US  | +
-| http://whatismyip.org/             | —  | —  | US  | +
-| http://myexternalip.com/raw        | —  | —  | DE  | +
-| http://wtfismyip.com/text          | —  | —  | US  | +
-| http://domains.google.com/checkip  | —  | —  | part of Google +
-| http://icanhazip.com/              | http://ipv4.icanhazip.com/  | http://ipv6.icanhazip.com/  | US  | +
-| http://checkip.feste-ip.net/       | http://v4.checkip.feste-ip.net/  | http://v6.checkip.feste-ip.net/  | DE  | +
-| http://ident.me/                   | http://ipv4.ident.me/  | http://ipv6.ident.me/  | UK  | +
-| http://ddnss.de/meineip.php        | http://ip4.ddnss.de/meineip.php  | http://ip6.ddnss.de/meineip.php  | DE  | +
-| http://checkip.spdyn.de/           | http://checkip4.spdyn.de/  | http://checkip6.spdyn.de/  | DE  | +
-| http://ifcfg.me/ip                 | http://4.ifcfg.me/ip  | http://6.ifcfg.me/ip  | FR  | +
-| http://nsupdate.info/myip          | http://ipv4.nsupdate.info/myip  | http://ipv6.nsupdate.info/myip  | DE  | +
-| http://checkip.zerigo.com          | http://checkip4.zerigo.com/  | http://checkip6.zerigo.com/  | US  | +
-| —  | http://checkip.dyndns.com/ <sup>1)</sup>  | http://checkipv6.dyndns.com/ <sup>1)</sup>  | US + UK  | +
-| —  | http://checkip.dyndns.com:8245/           | http://checkipv6.dyndns.com:8245/  | US + UK  | +
-| —  | http://checkip.dyn.com/ <sup>12)</sup>  | http://checkipv6.dyn.com/ <sup>1) 2)</sup>  | US + UK  | +
-| —  | http://ipv4.myip.dk/api/info/IPv4Address  | http://ipv6.myip.dk/api/info/IPv6Address  | US  | +
-| —  | http://ipv4.ipogre.com/linux.php          | http://ipv6.ipogre.com/linux.php  | US  | +
-| —  | http://v4.ipv6-test.com/api/myip.php      | http://v6.ipv6-test.com/api/myip.php  | FR  | +
-| —  | http://ipecho.net/plain  | —  | NL  | +
-| —  | http://ipinfo.io/ip      | —  | part of Amazon AWS  | +
-| —  | http://ifconfig.me/ip    | —  | JP  | +
-| —  | http://checkip.amazonaws.com  | —  | part of Amazon AWS  | +
-| —  | http://myip.dtdns.com    | —  | US  | +
-| —  | http://ip.changeip.com   | —  | US  | +
-| —  | http://freedns.afraid.org/dynamic/check.php  | —  | ?  | +
-| —  | http://freedns.afraid.org:8080/dynamic/check.php  | —  | ?  |+
  
- <sup>1)</sup> users reported timeout problems, use links in the line below (...:8245)\\ +==== WAN IP via own PHP script ==== 
- <sup>2)</sup> alias of *.dyndns.com+If you don't like to use one of the above you can write your ownHere is a sample script in PHP which can easily be deployed on any web hosting:
  
 +<code>
 +<!DOCTYPE html>
 +<body>
 +<?php
 +  echo $_SERVER['REMOTE_ADDR'];
 +?>
 +</body>
 +</html>
 +</code>
  
-===== Operation =====+==== Detecting WAN IP with script ==== 
 +If your WAN interface has the IP you want to propagate, this approach has the advantage of not depending on external services or even a working DNS resolution.
  
-|  {{:meta:icons:tango:48px-emblem-important.svg.png?nolink&32x32}}  | **Enable minimum one configuration/section!\\ You need to enable ddns service!**  |+Create the script: 
 + 
 +<code bash> 
 +cat << "EOF" > /etc/ddns/getwanip 
 +#!/bin/sh 
 +. /lib/functions/network.sh 
 +network_flush_cache 
 +for IPV in 4 6 
 +do 
 +eval network_find_wan${IPV%4} NET_IF 
 +eval network_get_ipaddr${IPV%4} NET_ADDR "${NET_IF}" 
 +echo "${NET_ADDR}" 
 +done 
 +EOF 
 +chmod +x /etc/ddns/getwanip 
 +</code> 
 + 
 +Use it in the DDNS configuration by issuing these UCI commands: 
 + 
 +<code bash> 
 +uci set ddns.NAMEOFYOURSERVICE.ip_source="script"                 #Change NAMEOFYOURSERVICE to yours 
 +uci set ddns.NAMEOFYOURSERVICE.ip_script="/etc/ddns/getwanip"     #Change NAMEOFYOURSERVICE to yours 
 +</code> 
 + 
 +Or by editing these lines in /etc/config/ddns: 
 + 
 +<code bash> 
 +config service 'NAMEOFYOURSERVICE'                 #Change NAMEOFYOURSERVICE to yours 
 +        option ip_source 'script' 
 +        option ip_script '/etc/ddns/getwanip' 
 +</code> 
 + 
 +===== Operation ===== 
 +:!: Enable minimum one configuration/section and ddns service!
  
 ==== Basics ==== ==== Basics ====
-Normally no user actions are required because //ddns-scripts// starts when hotplug ''ifup'' event happens. This will happen automatically at system startup when the named interface comes up. Event ''ifup'' also happens when a dialup network comes up.\\ +Normally no user actions are required because //ddns-scripts// starts when hotplug ''ifup'' event happens. 
-//ddns-scripts// regularly check if there is a difference between your IP address at DNS and your interface. If different an update request is sent to DDNS provider.+This will happen automatically at system startup when the named interface comes up. 
 +Event ''ifup'' also happens when a dialup network comes up. 
 +//ddns-scripts// regularly check if there is a difference between your IP address at DNS and your interface. 
 +If different an update request is sent to DDNS provider.
  
-  * Whenever you [Save & Applyan ''Enabled'' configuration/section __from LuCI webUI__ the corresponding script is automatically restarted. +  * Whenever you **Save & Apply** an ''Enabled'' configuration/section from LuCI the corresponding script is automatically restarted. 
-  * If you modify '''/etc/config/ddns''' configuration file __from console__, you need to restart //ddns-scripts// (see below) to apply changes.+  * If you modify ''/etc/config/ddns'' configuration file from CLI, you need to restart //ddns-scripts// (see below) to apply changes.
  
-To check if //ddns-scripts// are running you could check inside LuCI via '''Status''' -> '''Processes'''\\ or via console running <code|root@OpenWrt:/#>ps -w | grep dynami[c]</code> +To check if //ddns-scripts// are running you could check with **LuCI -> Status -> Processes** or via console running
-You should find something like '''... /bin/sh /usr/lib/ddns/dynamic_dns_updater.sh **myddns** 0'''\\ +
-for every configuration/section you configured and enabled, where **myddns** shows your configuration/section name.+
  
-Inside LuCI also exists a section '''Dynamic DNS''' at '''Status''' -> '''Overview''' page showing the current status of your DDNS configurations.+<code bash> 
 +pgrep -f -a dynamic 
 +</code> 
 + 
 +You should find something like ''... /bin/sh /usr/lib/ddns/dynamic_dns_updater.sh **myddns** 0'' for every configuration/section you configured and enabled, where **myddns** shows your configuration/section name. 
 + 
 +Inside LuCI also exists a section **Dynamic DNS -> Status -> Overview** page showing the current status of your DDNS configurations.
  
 ==== Run manually ==== ==== Run manually ====
-=== using LuCI === +=== Web interface instructions === 
-To **check** running //ddns-scripts// processes from the menu goto '''Status''' -> '''Processes'''.\\ +To **check** running //ddns-scripts// processes from the menu go to **Status -> Processes**
-Look for something like '''/bin/sh /usr/lib/ddns/dynamic_dns_updater.sh **myddns** 0'''.\\ +Look for something like ''/bin/sh /usr/lib/ddns/dynamic_dns_updater.sh -v 0 -S **myddns** %%--%% start''. 
-To **stop** a desired process press the [Terminateor [Killbutton.\\+ 
 +To **stop** a desired process press the **Terminate** or **Kill** button.
 The process should remove from the list. The process should remove from the list.
  
-You can enable/disable and start/stop //ddns-scripts// from '''System''' -> '''Startup''' menu.\\ +You can enable/disable and start/stop //ddns-scripts// from **System -> Startup** menu. 
-Look for service '''ddns''' and press the button for the desired action.+Look for service ''ddns'' and press the button for the desired action.
  
-You can additionally enable/disable and start/stop individual configuration/section from '''Overview'''-page at '''Services''' -> '''%%Dynamic DNS%%'''.+You can additionally enable/disable and start/stop individual configuration/section from **Overview -Services -> Dynamic DNS**.
  
- +=== Command-line instructions === 
-=== via console === +From console command line you could create an ''ifup'' hotplug event for the desired network interface. 
-From console command line you could create an '''ifup''' hotplug event for the desired network interface. This will start all enabled ddns configurations/sections monitoring this interface.\\ +This will start all enabled ddns configurations/sections monitoring this interface. 
-:!: Keep in mind that also other service processes (i.e. firewall) might be (re-)started via '''ifup''' hotplug event!\\+:!: Keep in mind that also other service processes (i.e. firewall) might be (re-)started via ''ifup'' hotplug event!
 For INTERFACE, type the specified //ddns-scripts// interface name (the interface name from /etc/config/network, usually 'wan') For INTERFACE, type the specified //ddns-scripts// interface name (the interface name from /etc/config/network, usually 'wan')
-<code|root@OpenWrt:/#>+ 
 +<code bash>
 ACTION=ifup INTERFACE=wan /sbin/hotplug-call iface ACTION=ifup INTERFACE=wan /sbin/hotplug-call iface
 </code> </code>
-To **start** only one //ddns-scripts// configuration/section (here '''myddns'''): + 
-<code|root@OpenWrt:/#+To **start** only one //ddns-scripts// configuration/section (here ''myddns''): 
-/usr/lib/ddns/dynamic_dns_updater.sh myddns &+ 
 +<code bash
 +/usr/lib/ddns/dynamic_dns_updater.sh -S myddns start &
 </code> </code>
-To **start** all //ddns-scripts// configurations configured for one interface (the interface name from /etc/config/network, usually 'wan'): +Note that verbosity can also be increased, which is very useful for debugging when creating your own ddns client scripts. e.g. 
-<code|root@OpenWrt:/#+<code bash
-sh +/usr/lib/ddns/dynamic_dns_updater.sh -S myddns -v1 start
-/usr/lib/ddns/dynamic_dns_functions.sh # note the leading period followed by a space +
-start_daemon_for_all_ddns_sections "wan" +
-exit+
 </code> </code>
-To **stop** one configuration/section you need to list running ddns processes with: +see ''/usr/lib/ddns/dynamic_dns_updater.sh -h'' for more details 
-<code|root@OpenWrt:/#+ 
-ps -w | grep dynami[c]+To **stop** one configuration/section you need to find it's PID and kill it manually e.g. 
 +<code bash
 +pgrep -f -a dynamic 
 +kill <pid of matching dynamic_dns_updater.sh process>
 </code> </code>
-you will get something like: + 
-<code|root@OpenWrt:/#> + 
-2493 root      1440 R    {dynamic_dns_upd} /bin/sh /usr/lib/ddns/dynamic_dns_updater.sh myddns_1 0 +To **start** all //ddns-scripts// configurations configured for a given interface e.g. ''wan'' 
-2494 root      1440 R    {dynamic_dns_upd} /bin/sh /usr/lib/ddns/dynamic_dns_updater.sh myddns_2 0 +<code bash> 
-</code> +/usr/lib/ddns/dynamic_dns_updater.sh -n wan start
-now you need to kill every running process: +
-<code|root@OpenWrt:/#> +
-kill 2493 # to kill one process +
-kill 2493 2494 # to kill multiple processes+
 </code> </code>
-To **stop** all running processes at once ('''killall''' might not be available on all systems): + 
-<code|root@OpenWrt:/#+**All** configured ddns services in ''/etc/config/ddns'' can of can be stopped,started,restarted and reloaded accordingly with the service command e.g. 
-killall dynamic_dns_updater.sh # if killall is available +<code> 
-ps | grep dynami[c] | awk '{print $1}' | xargs kill # or if not available+service ddns restart
 </code> </code>
-**__Since BB 14.07__** you could ''enable/disable'' and ''start/stop/restart'' all enabled ddns configuration/section like every other service: 
-<code|root@OpenWrt:/#> 
-/etc/init.d/ddns disable 
-/etc/init.d/ddns enable 
-/etc/init.d/ddns start 
-/etc/init.d/ddns stop 
-/etc/init.d/ddns restart 
-</code> 
- 
  
-=== using scheduler ===+=== Using scheduler ===
 Each configuration/section of //ddns-scripts// can be configured to run once including retry on error so it is guaranteed that the update is sent to the provider. Each configuration/section of //ddns-scripts// can be configured to run once including retry on error so it is guaranteed that the update is sent to the provider.
  
-To configure your configuration/section to run once you need to set '''option force_interval''' to '''0'''. Setting of '''option force_unit''' is ignored.\\ +To configure your configuration/section to run once you need to set ''option force_interval 0''. 
-Inside LuCI set '''Force Interval''' in [Timer Settings]-tab of your desired configuration\\ +Setting of ''option force_unit'' is ignored. 
-or edit '''/etc/config/ddns''' on console. +Inside LuCI set **Force Interval** in **Timer Settings** tab of your desired configuration or edit ''/etc/config/ddns'' on console. 
-<code|/etc/config/ddns>+ 
 +<code bash> 
 +/etc/config/ddns
 config 'service' 'myddns' config 'service' 'myddns'
  ...  ...
Line 421: Line 414:
 </code> </code>
  
-If you set //ddns// service to ''enable'' then all configurations/sections are started during interface '''ifup'''.\\ +If you set //ddns// service to ''enable'' then all configurations/sections are started during interface ''ifup''
-The configuration/section configured to run once will stop after successful update.\\ +The configuration/section configured to run once will stop after successful update. 
-To guarantee that your configurations only run once not looking for an interface event you need to disable //ddns// service.\\ +To guarantee that your configurations only run once not looking for an interface event you need to disable //ddns// service. 
-To start your configuration via [[docs:guide-user:base-system:notuci.config#etccrontabsroot_cronjob_aka_crontab|build in crond]] use the following entry as ''command'' inside crontab configuration (replace '''myddns''' with the name of your configuration/section): +To start your configuration via [[docs:guide-user:base-system:notuci.config#etccrontabsroot_cronjob_aka_crontab|build in crond]] use the following entry as ''command'' inside crontab configuration (replace ''myddns'' with the name of your configuration/section): 
-<code|root@OpenWrt:/#>+ 
 +<code bash>
 /usr/lib/ddns/dynamic_dns_updater.sh myddns 0 & /usr/lib/ddns/dynamic_dns_updater.sh myddns 0 &
 </code> </code>
Line 432: Line 426:
  
 === Syslog === === Syslog ===
-The '''option use_syslog''' (also in LuCI) allows to define the level of events logged to syslog: +The ''option use_syslog'' (also in LuCI) allows to define the level of events logged to syslog: 
- Value  ^ Reporting  +^ Value ^ Reporting ^ 
-  | disable  +| 0 | disable | 
-  | info, notice, warning, errors  +| 1 | info, notice, warning, errors | 
-  | notice, warning, errors  +| 2 | notice, warning, errors | 
-  | warning, errors  +| 3 | warning, errors | 
-  | errors  +| 4 | errors | 
- :!: Critical errors forcing //ddns-scripts// to break (stop) are always logged to syslog. :!:  ||+| :!: Critical errors forcing //ddns-scripts// to break (stop) are always logged to syslog ||
  
  
 === Logfile === === Logfile ===
-//ddns-scripts// have built-in logfile support.\\+//ddns-scripts// have built-in logfile support.
 Logfiles are automatically truncated to a settable number of lines (default 250 lines). Logfiles are automatically truncated to a settable number of lines (default 250 lines).
  
-Inside LuCI you could enable logfile in [Advanced Settings]-tab of desired configuration/section.\\ +Inside LuCI you could enable logfile in **Advanced Settings** tab of desired configuration/section. 
-From console you need to edit '''/etc/config/ddns''' file: +From console you need to edit the config file: 
-<code|/etc/config/ddns>+ 
 +<code bash> 
 +/etc/config/ddns
 config 'service' 'myddns' config 'service' 'myddns'
  ...  ...
Line 454: Line 450:
 </code> </code>
  
-To view logfile content from LuCI select the [Log File Viewer]-tab of desired configuration/section and press the [Read / Reread log file]-button. +In case your device has enough built in memory or if you are using Extroot, you might want to store the ddns logs persistently. 
-From console you should change to the ddns log directory (default '''/var/log/ddns''').\\+To achieve this, you need to change the log file location by adding the following line in the ''global'' section of ''/etc/config/ddns'': 
 + 
 +<code bash> 
 +# /etc/config/ddns 
 +config 'ddns' 'global' 
 + ... 
 + option 'ddns_logdir' '<your_custom_log_dir>' 
 +</code> 
 + 
 +This option must be defined in the global section of the ''/etc/config/ddns'' file. 
 +If the option is defined at config service level, it will be ignored by the ''/usr/lib/ddns/dynamic_dns_functions.sh'' script and the log location will be defaulted to ''/var/log/ddns''
 + 
 +To view logfile content from LuCI select the **Log File Viewer** tab of desired configuration/section and press the **Read / Reread log file** button. 
 +From console you should change to the ddns log directorydefault ''/var/log/ddns''.
 You will find a logfile for every configuration/section. You will find a logfile for every configuration/section.
-<code|root@OpenWrt:/#+ 
-cd /var/log/ddns +<code bash
-ls -la +cat /var/log/ddns/myddns_ipv4.log 
-cat myddns_ipv4.log +cat /var/log/ddns/myddns_ipv6.log
-cat myddns_ipv6.log+
 </code> </code>
  
 ==== Debugging ==== ==== Debugging ====
 +To debug what's going on, you can run //ddns-scripts// in verbose mode.
 +Following verbose level are defined:
  
-To debug what's going on, you can run //ddns-scripts// in verbose mode.\\ Following verbose level are defined: 
 ^ Level ^ Description ^ ^ Level ^ Description ^
-  | Non verbose - No output  +| 0 | Non verbose, no output | 
-  | Output to console (default)  +| 1 | Output to console (default) | 
-  | Output to console and logfile.\\ Run once WITHOUT retry on error.  +| 2 | Output to console and logfile, run once WITHOUT retry on error | 
-  | Output to console and logfile.\\ Run once WITHOUT retry on error.\\ Sending NO update to DDNS service.  |+| 3 | Output to console and logfile, run once WITHOUT retry on error, sending NO update to DDNS service |
  
-Before starting debugging stop all running //ddns-scripts// processes:\\ +Before starting debugging stop all running //ddns-scripts// processes: 
-<code|root@OpenWrt:/#>+ 
 +<code bash>
 /etc/init.d/ddns stop /etc/init.d/ddns stop
 /etc/init.d/ddns disable /etc/init.d/ddns disable
 </code> </code>
 +
 validate that no //ddns-scripts// processes running: validate that no //ddns-scripts// processes running:
-<code|root@OpenWrt:/#>ps | grep dynami[c]</code> 
  
-Now you can start one configuration/section for debugging. To stop/break running script press [CTRL]+C.\\ +<code bash> 
-Replace '''myddns''' with your desired configuration/section name and '''level''' with the desired verbose level. +pgrep -f -a dynamic 
-<code|root@OpenWrt:/#>+</code> 
 + 
 +Now you can start one configuration/section for debugging. 
 +To stop/break running script press [CTRL]+C. 
 +Replace ''myddns'' with your desired configuration/section name and ''level'' with the desired verbose level. 
 + 
 +<code bash>
 /usr/lib/ddns/dynamic_dns_updater.sh myddns level /usr/lib/ddns/dynamic_dns_updater.sh myddns level
 </code> </code>
  
-You will get full description of errors and the output of programs like wget, nslookup etc. used by //ddns-scripts//\\+You will get full description of errors and the output of programs like wget, nslookup etc. used by //ddns-scripts//.
  
 ==== Common errors ==== ==== Common errors ====
- 
 === Network and name resolution problems === === Network and name resolution problems ===
 +Check your communication settings with the following commands:
  
-Check your communication settings with the following commands: +<code bash>
-<code|root@OpenWrt:/#>+
 nslookup google-public-dns-a.google.com nslookup google-public-dns-a.google.com
  
Line 507: Line 522:
  
 === HTTPS/SSL problems === === HTTPS/SSL problems ===
 +Check if your DDNS provider ONLY supports secure requests and enable HTTPS ''option use_https'' in your configuration.
 +Packages ''wget'' or ''curl'' not installed to support secure communication.
 +''wget/curl'' could not access/validate SSL certificates.
 +Check certificate installation and run ''wget'' or ''curl'' in verbose/debug mode:
  
-Check if your DDNS provider ONLY supports secure requests and enable HTTPS (''option use_https'') in your configuration.\\ +<code bash
-Packages '''wget''' or '''curl''' not installed to support secure communication.\\ +ls -a -R -/etc/ssl
-'''wget'/'curl''' could not access/validate SSL certificates.\\ +
-Check certificate installation and run '''wget''' or '''curl''' in verbose/debug mode: +
-<code|root@OpenWrt:/#+
-ls -la /etc/ssl +
-ls -la /etc/ssl/certs+
  
 wget -d -O /tmp/wget.out https://www.google.com --ca-certificate=/etc/ssl/certs/ca-certificates.crt # single certificate file wget -d -O /tmp/wget.out https://www.google.com --ca-certificate=/etc/ssl/certs/ca-certificates.crt # single certificate file
Line 524: Line 538:
 curl -v -o /tmp/curl.out https://www.google.com --insecure # ignore certificate !!! INSECURE !!! curl -v -o /tmp/curl.out https://www.google.com --insecure # ignore certificate !!! INSECURE !!!
 </code> </code>
- 
  
 ===== Provider specifics ===== ===== Provider specifics =====
- 
 ==== Overview ==== ==== Overview ====
-Remember to read how to [[#custom_service1|configure a custom service]].\\ +Remember to read how to [[#custom_service1|configure a custom service]]. 
-At provider specific settings, only parameters that needs to be changed are described.\\+At provider specific settings, only parameters that needs to be changed are described.
 The relevant parameters to use together with a custom settings are: The relevant parameters to use together with a custom settings are:
-^ UCI option  ^ LuCI description  ^ Explanatory note  ^ 
-| service_name  | DDNS Service provider  | Inside LuCI set to '''--custom--''' or delete from '''/etc/config/ddns''' if you need to use custom update URL.  | 
-| update_url  | Custom update-URL  | Copy from description below, if necessary.  | 
-| domain  | Hostname/Domain  | The already registered name at your DDNS provider.\\ :!: **Must be your public FQDN** because used by nslookup command to check if the send IP update was recognized by your provider and published around World Wide DNS.  | 
-| username  | Username  | Normally your username but possibly used with different settings.  | 
-| password  | Password  | Normally your password but possibly used with different settings.  | 
  
-If you find a FIXME at a provider description below, please support the [[packages:pkgdata_lede17_1:ddns-scripts|ddns-scripts]] maintainer to test and update this page.\\ +^ UCI option ^ LuCI description ^ Explanatory note ^ 
-Please post a [[#support]] request if something is not working as described or needs to be updated.\\ +| service_name | DDNS Service provider | Inside LuCI set to **--custom--** or delete from ''/etc/config/ddns'' if you need to use custom update URL | 
-**Thanks!**+| update_url | Custom update-URL | Copy from description below, if necessary | 
 +| domain | Hostname/Domain | The already registered name at your DDNS provider.\\ :!: **Must be your public FQDN** because used by nslookup command to check if the send IP update was recognized by your provider and published around World Wide DNS | 
 +| username | Username | Normally your username but possibly used with different settings | 
 +| password | Password | Normally your password but possibly used with different settings | 
 + 
 +If you find a FIXME at a provider description below, please support the [[packages:pkgdata_lede17_1:ddns-scripts|ddns-scripts]] maintainer to test and update this page. 
 +Please post a [[#support]] request if something is not working as described or needs to be updated. 
 + 
 +If you find problem **"Failed writing HTTP request: Bad file descriptor"** in some server / wget version (see: https://bugzilla.redhat.com/show_bug.cgi?id=912358), it is worth to try changing: 
 + 
 +<code diff> 
 +# /etc/config/ddns 
 +- http://[USERNAME]:[PASSWORD]path_to_your_provider_and_other_things 
 ++ --user=[USERNAME] --password:[PASSWORD] http://path_to_your_provider_and_other_things 
 + 
 +# /usr/lib/ddns/dynamic_dns_updater.sh 
 +- update_output=$( $retrieve_prog "$final_url"
 ++ update_output=$( $retrieve_prog $final_url ) 
 +</code> 
 + 
 +==== cloudflare.com ==== 
 +Last updated: 2022-09-11 
 + 
 +[[https://www.cloudflare.com/|Homepage]] 
 + 
 +As of OpenWrt version 22.03.0, //ddns-scripts// supports the use of [[https://blog.cloudflare.com/api-tokens-general-availability/|API tokens]]. 
 +API Tokens provide a new way to authenticate with the Cloudflare API. 
 + 
 +[[https://dash.cloudflare.com/profile/api-tokens|Create Custom Token]] by following the [[https://developers.cloudflare.com/api/tokens/create/|Creating API tokens guide]]. make sure to add "Zone DNS Edit" Permission to your custom token.  
 +You can also "include Specific zone" under Zone Resources. 
 +These allow for scoped and permissioned access to resources and use the RFC compliant [[rfc>6750#section-2.1|Authorization Bearer Token Header]]. 
 +For more information on Token vs Key see the [[https://api.cloudflare.com/#getting-started-requests|Cloudflare v4 API]] documentation. 
 + 
 +<code> 
 +service_name cloudflare.com-v4 
 +domain [Your domain, here: example.com] 
 +username Bearer 
 +password [Your API token] 
 +</code> 
 + 
 +To use subdomains (CNAME or A records), use the format below when filling your credentials: 
 + 
 +<code> 
 +domain {subdomain}@[zone] 
 +</code> 
 + 
 +Examples: 
 +  * If the hostname is "sample.example.com", the "domain" field would be "sample@example.com" 
 +  * If the hostname is "dev1.sample.example.com", the "domain" field would be "dev1.sample@example.com" 
 +  * If using Cloudflare's "Subdomain Support", your zone may already be "foo.example.com", so if the DDNS hostname is "bar.foo.example.com" the domain field would be "bar@foo.example.com" 
  
-If you find problem **"Failed writing HTTP request: Bad file descriptor"** in some server / wget version (see: https://bugzilla.redhat.com/show_bug.cgi?id=912358), it is worth to try changing the ''update_url'' in ''/etc/config/ddns'' from 
-  "http://[USERNAME]:[PASSWORD]path_to_your_provider_and_other_things" 
-to 
-  "--user=[USERNAME] --password:[PASSWORD] http://path_to_your_provider_and_other_things" 
-AND change one line in ''/usr/lib/ddns/dynamic_dns_updater.sh'' from 
-  update_output=$( $retrieve_prog "$final_url" ) 
-to 
-  update_output=$( $retrieve_prog $final_url ) 
  
 ==== dnsomatic.com ==== ==== dnsomatic.com ====
-Last updated: 2020-01-06\\ +Last updated: 2021-05-16
-DNS-O-Matic provides you a free and easy way to announce your dynamic IP changes to multiple services with a single update. Using DNS-O-Matic allows you to pick and choose what Dynamic DNS services you want to notify, all from one easy to use interface. [[https://www.dnsomatic.com/|From dns-o-matic homepage]] -- [[https://www.dnsomatic.com/wiki/|Documentation]] +
  
-You need to change your OpenDNS password to one that doesn't contain HTML special characters [[https://support.opendns.com/hc/en-us/community/posts/360055742852-dns-o-matic-username-password-|On dnsomatic username and password]]+DNS-O-Matic provides you a free, easy and secure way to announce your dynamic IP changes to multiple services with a single update. 
 +Using DNS-O-Matic allows you to pick and choose what Dynamic DNS services you want to notify, all from one easy to use interface. 
 +[[https://www.dnsomatic.com/|From dns-o-matic homepage]] -- [[https://www.dnsomatic.com/wiki/|Documentation]] 
 + 
 +DNS-O-Matic authentication is integrated with OpenDNS, so your DNS-O-Matic credentials are the same as your OpenDNS ones. You need to change your OpenDNS password to one that doesn't contain HTML special characters [[https://support.opendns.com/hc/en-us/community/posts/360055742852-dns-o-matic-username-password-|On dnsomatic username and password]] 
 + 
 +If you would like to make sure your SSL connection is verified, then [[:docs:guide-user:services:ddns:client#ssl_support|install the CA certificates]] 
 + and set the path to **/etc/ssl/certs** //(Path to CA-Certificate in the LuCI or **option 'cacert' '/etc/ssl/certs'** when configuring by command line.)//
  
 To update all services registered with DNS-O-Matic in one configuration/section use the following settings in /etc/config/ddns: To update all services registered with DNS-O-Matic in one configuration/section use the following settings in /etc/config/ddns:
-<code> +<code bash
-#/etc/config/ddns+# /etc/config/ddns
 config service 'DNSoMATIC' config service 'DNSoMATIC'
-        option lookup_host 'anotherddns.com'           ### It must be a FQDN that is active on dns-o-matic dashboard to be refreshed by it +        option lookup_host   'anotherddns.com'             # It must be a FQDN that is active on dns-o-matic dashboard to be refreshed by it. if using openDNS, use myip.opendns.com 
-        option interface 'wan'                         ### Set it to the network interface to be monitored on changes +        option interface     'wan'                         # Set it to the network interface to be monitored on changes 
-        option ip_source 'web' +        option ip_source     'web' 
-        option ip_url 'http://checkip.amazonaws.com/' +        option ip_url        'http://checkip.amazonaws.com/' # does not appear to be used, at least by the LUCI interface 
-        option use_https '1' +        option use_https     '1
-        option service_name 'dnsomatic.com' +        option cacert         '/etc/ssl/certs
-        option domain 'all.dnsomatic.com'              ### It will instruct dns-o-matic to update all services set on its dashboard +        option service_name  'dnsomatic.com' 
-        option username 'OPENDNSusername'              ### dns-o-matic uses OpenDNS login credentials +        option domain        'all.dnsomatic.com'            # It will instruct dns-o-matic to update all services set on its dashboard 
-        option password 'OPENDNSpassword'              ### It must not contain html reserved characters +        option username      'OPENDNSusername'              # dns-o-matic uses OpenDNS login credentials 
-        option enabled '1'+        option password      'OPENDNSpassword'              # It must not contain html reserved characters 
 +        option enabled       '1'
 </code> </code>
  
 Alternatively, you can issue uci commands: Alternatively, you can issue uci commands:
-<code>+ 
 +<code bash>
 uci add ddns dnsomatic uci add ddns dnsomatic
 uci set ddns.dnsomatic.lookup_host='DDNSchangedBYdnsomatic.com'  ##Change it to yours uci set ddns.dnsomatic.lookup_host='DDNSchangedBYdnsomatic.com'  ##Change it to yours
 uci set ddns.dnsomatic.interface='wan'                           ##Change it to yours uci set ddns.dnsomatic.interface='wan'                           ##Change it to yours
 uci set ddns.dnsomatic.ip_source='web' uci set ddns.dnsomatic.ip_source='web'
-uci set ddns.dnsomatic.ip_url='http://checkip.amazonaws.com/'+uci set ddns.dnsomatic.ip_url='http://checkip.amazonaws.com/'    ## not mandatory
 uci set ddns.dnsomatic.use_https='1' uci set ddns.dnsomatic.use_https='1'
 uci set ddns.dnsomatic.service_name='dnsomatic.com' uci set ddns.dnsomatic.service_name='dnsomatic.com'
Line 590: Line 646:
 /etc/init.d/ddns reload /etc/init.d/ddns reload
 </code> </code>
 +
 ==== duckdns.org ==== ==== duckdns.org ====
-Last updated: 2015-07-14\\ +Last updated: 2024-01-02
-[[http://www.duckdns.org/|Homepage]] -- [[http://www.duckdns.org/install.jsp|Installation instructions]] -- [[http://www.duckdns.org/faqs.jsp|FAQ]]+
  
-FIXME There is another [[docs:guide-user:services:ddns:duckdns|description]] hereI take over the link during rewriting this wiki pageDELETEME+For detailed instructions, see [[docs:guide-user:services:ddns:duckdns|DuckDNS DDNS Client]]. 
 + 
 +==== dynu.com ==== 
 +Last updated: 2024-10-05 
 + 
 +[[http://dynu.com/ | Homepage]] -- [[https://www.dynu.com/DynamicDNS/IP-Update-Protocol | IP Update Protocol]] 
 + 
 +It works out of the box in the standard most common setup with a single user-defined //hostname// and a domain selected from what is offered by this provider. 
 + 
 +In order to update v4 or v6 IP address for a //subdomain// that they call [[https://www.dynu.com/Resources/Tutorials/DynamicDNS/Advancedfeatures/Aliases | alias]] the following custom configuration can be used:
  
-Inside LuCI web UI select **--custom--** and fill in the other options accordingly.\\ 
-:!: Be sure you install ssl support.\\ 
-Additional use update_url and settings from below:\\ 
 <code> <code>
-update_url http://www.duckdns.org/update?domains=[USERNAME]&token=[PASSWORD]&ip=[IP] +service_name delete --custom-- 
-domain [Your FQDN] +update_url api.dynu.com/nic/update?hostname=[DOMAIN]&alias=[PARAMENC]&myipv6=[IP]&password=[PASSWORD
-username [Your Host without ".duckdns.org"] +domain [your 3rd level domain, like "mydomain.example.com"] 
-password [Your token+paramenc [your alias, like "myhost"
-use_https 1 +username [dummy, not used, but Luci expects something to be set] 
-cacert [path to certificate file or directory]+password [your update token]
 </code> </code>
 +This will update IPv6 address for ''myhost.mydomain.example.com''
 +
 +The //update token// used as a password in both standard and custom configurations is an MD5/SHA256 hash of "IP Update Password" that is set in Control Panel /[[https://www.dynu.com/en-US/ControlPanel/ManageCredentials | Manage Credentials]]
 +
 +The hash can be generated on their [[https://www.dynu.com/NetworkTools/Hash | web site]] or locally by the user.
 +
  
 ==== freedns.afraid.org ==== ==== freedns.afraid.org ====
-Last updated: 2015-07-15\\ +Last updated: 2015-07-15 
-[[http://freedns.afraid.org/|Homepage]] -- [[http://freedns.afraid.org/faq/|FAQ]]\\+ 
 +[[http://freedns.afraid.org/|Homepage]] -- [[http://freedns.afraid.org/faq/|FAQ]]
  
 Option 1: FIXME Option 1: FIXME
 +
 <code> <code>
 service_name afraid.org-v2-token service_name afraid.org-v2-token
Line 619: Line 689:
 password [Your authorisation token, NOT your account password] password [Your authorisation token, NOT your account password]
 </code> </code>
-To find your authorisation token, go to http://freedns.afraid.org/dynamic/, login, click "Direct URL".\\ 
-On the location bar of your browser, copy the authorisation token,\\ 
-which is the part after %%http://freedns.afraid.org/dynamic/update.php?%% url\\ 
-and paste it in the password field. 
  
-Option 2: FIXME ([[https://dev.openwrt.org/ticket/10192|Taken from here.]])+To find your authorisation token, go to http://freedns.afraid.org/dynamic/, login, click "Direct URL"
 +On the location bar of your browser, copy the authorisation token, which is the part after %%http://freedns.afraid.org/dynamic/update.php?%% URL and paste it in the password field. 
 +The URL to update IP result in error 404, need to change source code. 
 + 
 +Option 2: FIXME ([[https://dev.openwrt.org/ticket/10192|Taken from here]]) 
 <code> <code>
 service_name delete / --custom-- service_name delete / --custom--
Line 631: Line 702:
 username [NOT used. Set to a character of your choice, because LuCI does not accept empty field] username [NOT used. Set to a character of your choice, because LuCI does not accept empty field]
 password [NOT used because already part of direct URL. Set to a character of your choice, because LuCI does not accept empty field] password [NOT used because already part of direct URL. Set to a character of your choice, because LuCI does not accept empty field]
 +</code>
 +
 +Option 3
 +
 +<code>
 +service_name afraid.org-v2-basic or afraid.org-basicauth
 +domain [Your FQDN]
 +username [your username of afraid.org]
 +password [Your account password]
 +</code>
 +
 +Option 4 Prefer
 +
 +<code>
 +service_name afraid.org-keyauth
 +domain [Your FQDN]
 +username [NOT used. Set to a character of your choice, because LuCI does not accept empty field]
 +password [Your authorisation token, NOT your account password]
 </code> </code>
  
 ==== domains.google.com ==== ==== domains.google.com ====
-Last updated: 2016-04-20\\+Last updated: 2016-04-20
  
-Google Domains allows for dynamic names to be set up in the section called Synthetic Records. To access it, log in to https://domains.google.com and go to Configure DNS for the domain in question, then scroll down to Synthetic Records and add a new one. It will issue a specific username and password for this hostname. Google requires HTTPS for updates, so be sure to also install package wget or curl in order to allow this.+Google Domains allows for dynamic names to be set up in the section called Synthetic Records. 
 +To access it, log in to https://domains.google.com and go to Configure DNS for the domain in question, then scroll down to Synthetic Records and add a new one. 
 +It will issue a specific username and password for this hostname. 
 +Google requires HTTPS for updates, so be sure to also install package wget or curl in order to allow this.
 Use the following settings: Use the following settings:
 +
 <code> <code>
 service_name --custom-- service_name --custom--
Line 649: Line 742:
  
 ==== gratisdns.dk ==== ==== gratisdns.dk ====
-Last updated: 2015-07-20\\+Last updated: 2015-07-20 
 [[http://web.gratisdns.dk/|Homepage]] (Danish only) [[http://web.gratisdns.dk/|Homepage]] (Danish only)
  
 Taken from [[https://forum.openwrt.org/viewtopic.php?pid=281262|OpenWrt forum]] Taken from [[https://forum.openwrt.org/viewtopic.php?pid=281262|OpenWrt forum]]
  
-GratisDNS.dk is only supported by //ddns-scripts// using custom service settings.\\ +GratisDNS.dk is only supported by //ddns-scripts// using custom service settings and requires to [[#ssl_support|install]] and configure SSL support. 
-GratisDNS.dk require to [[#ssl_support|install]] and configure SSL support.+
 <code> <code>
 service_name delete / --custom-- service_name delete / --custom--
-update_url http://ssl.gratisdns.dk/ddns.phtml?u=[USERNAME]&p=[PASSWORD]&d=Mydomain&h=[DOMAIN]&i=[IP]+update_url https://ssl.gratisdns.dk/ddns.phtml?u=[USERNAME]&p=[PASSWORD]&d=Mydomain&h=[DOMAIN]&i=[IP]
  !!! replace "Mydomain" in this url with domain part of your FQDN.  !!! replace "Mydomain" in this url with domain part of your FQDN.
  Sample: your FQDN: host.example.com -> "Mydomain" set to example.com  Sample: your FQDN: host.example.com -> "Mydomain" set to example.com
- Sample: http://ssl.gratisdns.dk/ddns.phtml?u=[USERNAME]&p=[PASSWORD]&d=example.com&h=[DOMAIN]&i=[IP]+ Sample: https://ssl.gratisdns.dk/ddns.phtml?u=[USERNAME]&p=[PASSWORD]&d=example.com&h=[DOMAIN]&i=[IP]
 domain [Your FQDN] domain [Your FQDN]
 username [Your username] username [Your username]
Line 668: Line 762:
  
 ==== he.net ==== ==== he.net ====
-Last updated: 2015-07-15\\+Last updated: 2023-10-05 
 [[https://dns.he.net/|Homepage]] [[https://dns.he.net/|Homepage]]
 +[[https://dns.he.net/docs.html|Details about their free dynamic DNS service]]
  
-FIXME There is another [[docs:guide-user:services:ddns:hurricaneelectricfreedns|description]] heretake over the link during rewriting this wiki pageDELETEME+Background (who they are): Hurricane Electric (referred to as HE.net below) is one of the //original// supporters/pushers of the IPv6 internet (and also provide a [[https://tunnelbroker.net/|free tunnel broker]] if you want IPv6 connectivity but your ISP is in the stone-ages), and HE.net also run major internet backbones. 
 + 
 +HE.net is a great option if you //already// have a domain (or sub-domain) you can point at their 5 nameservers (ns[1-5]/dot/he.net).  This will need to be done **before** you can setup the zone (your domain or subdomain) up. 
 + 
 +You can then opt for one of an A (for IPv4) record or an AAAA (for IPv6) record //under// that sub-domain, to be updated dynamically by the ddns-service.  Security of this ability is provided via a 16-character api-access-key they can generate for you (or you can specify your own). 
 + 
 +If you don't have an HE.net account, you will need to [[https://ipv6.he.net/certification/register.php|open a free account]] 
 + 
 +If you don't already have a domain (or subdomain) pointing to HE.net 
 +* Go to the [[https://dns.he.net/|DNS management page]]. 
 +* Click on **Add a new domain** (on the left side-bar) 
 +* Enter your domain or subdomain (that should //already// have pointed to their 5 nameservers), and click the green **Add domain!** button (the page may take a few seconds to respond, do not click multiple times) 
 +* Next to the //new domain//, click the 2nd icon (the one that looks like classic-windows app + pencil icon) to **Edit** the records for that dns-zone. 
 +* Click the **New A** button (for IPv4) or **New AAAA** button (for IPv6). 
 +* For **Name**, enter only the part part before the first period in the FQDN (the part that goes //before// the domain or subdomain you pointed at HE's nameserver). 
 +* **//MAKE SURE//** you click **Enable entry for dynamic dns** checkbox **ON** 
 +* Click **Submit** 
 +* Click the //icon that looks like a small two-arrows// in a circle (pointing to each other) in the **DDNS** column. 
 +* In the popup **Dynamic DNS Record**, here you can either generate a key (up to 16 characters) or specify your own.  **You will need this for the password in the example config below** 
 + 
 +(src - above steps tested and based on [[https://networkingnotesblog.wordpress.com/2015/10/15/using-dynamic-dns-server-with-he-net/|this blog]]). 
 + 
 +*Note:* In order for a zone to be accepted for addition to HE.net's DNS-manager, it **must** //already// be configured to point to ns1.he.net / ns2.he.net / ns3.he.net / ns4.he.net / ns5.he.net.  Adding the domain or subdomain to HE.net will fail w/ an error otherwise.  Note: I don't know if they check for all five nameservers, but may as well just add all 5 NS records to your domain (with the registrar you setup the domain) or if a sub-domain (at your existing host. 
 + 
 +Lastly, if you want to (it's optional) protect the update-requests that the ddns-service does, with TLS, you can see the [[client#ssl_support1|above section on SSL]]. 
 +The following settings have been tested/worked: 
 + 
 +In the below example config, the (sub-)domain pointing to HE.net nameservers is "zone.domain.tld", and the A record is "addr-a-record" (thus the full dynamic hostname will be addr-a-record.zone.domain.tld).
  
-Use the following settings: 
 <code> <code>
-service_name he.net +# /etc/config/ddns 
-domain [Your FQDN] +config service 'dns_he_net' 
-username [Your FQDN] +        option service_name 'he.net' 
-password [Your password]+        option enabled '1' 
 +        option domain 'addr-a-record.your.domain.tld'       # this is the A or AAAA record you created and set up a DynDNS Key for  
 +        option lookup_host 'addr-a-record.your.domain.tld'  # same as above - script queries this to see if it's outdated and needs to be updated 
 +        option use_ipv6 '0'                                 # whether to update your AAAA record (by default: A record) 
 +        option username 'your.domain.tld'                   # this is not your HE.net username, but your zone (zone.domain.tld) delegated to HE.net nameservers 
 +        option password 'XXXXXXXXXXXXXXXX'                  # this part is the generated Key for the DynDNS function  
 +        option ip_source 'network' 
 +        option ip_network 'wan' 
 +        option interface 'wan' 
 +        option use_syslog '2' 
 +        option check_unit 'minutes' 
 +        option force_unit 'minutes' 
 +        option retry_unit 'seconds'
 </code> </code>
 +
 +More info about how this works underneath the covers: https://dns.he.net/docs.html
 +
 +Note: There is another (older) doc here: [[docs:guide-user:services:ddns:hurricaneelectricfreedns|doc here]].
 +
  
 ==== mythic-beasts.com ==== ==== mythic-beasts.com ====
-Last updated: 2015-07-20\\+Last updated: 2015-07-20 
 [[http://mythic-beasts.com/|Homepage]] -- [[https://www.mythic-beasts.com/support|Support]] [[http://mythic-beasts.com/|Homepage]] -- [[https://www.mythic-beasts.com/support|Support]]
  
-FIXME\\ +FIXME 
-Looking on description at "[[https://www.mythic-beasts.com/support/domains/dynamic/openwrt|Use Mythic Beasts Dynamic DNS with your OpenWRT router]]" and on the existing source code I found out that there must be issues updating Dynamic DNS.\\ +Looking on description at "[[https://www.mythic-beasts.com/support/domains/dynamic/openwrt|Use Mythic Beasts Dynamic DNS with your OpenWRT router]]" and on the existing source code I found out that there must be issues updating Dynamic DNS. 
-I have gone in contact with support of mythic-beasts.com. I will update as soon a solution is available.\\+I have gone in contact with support of mythic-beasts.com. 
 +I will update as soon a solution is available.
  
 ==== namecheap.com ==== ==== namecheap.com ====
-Last updated: 2015-07-21\\+Last updated: 2015-07-21 
 [[https://www.namecheap.com/|Homepage]] -- [[https://www.namecheap.com/support/knowledgebase.aspx|Knowledgebase]] [[https://www.namecheap.com/|Homepage]] -- [[https://www.namecheap.com/support/knowledgebase.aspx|Knowledgebase]]
  
-Note that with the namecheap protocol, the username option is translated to the host argument in the update request.\\ +Note that with the namecheap protocol, the username option is translated to the host argument in the update request. 
-Therefore, it should be the host-part on the DNS record, not the username that you use to log into the namecheap.com site.\\ +Therefore, it should be the host-part on the DNS record, not the username that you use to log into the namecheap.com site. 
-To update multiple hosts you might need to define separate configuration/section for each host.\\ +To update multiple hosts you might need to define separate configuration/section for each host. 
-To get your password, log into the namecheap.com site, enter the management console for the domain, and click the Dynamic DNS menu option.\\+To get your password, log into the namecheap.com site, enter the management console for the domain, and click the Dynamic DNS menu option.
  
-:!: Currently //ddns-scripts// only supports the case where your dynamic subdomain has the same IP address as for your unqualified domain. Otherwise you will send updates to namecheap.com every "option check_interval" 10 minutes (default) because your FQDN is not validated.  [[https://github.com/openwrt/packages/issues/2348|Proposed solution here, which you can easily implement yourself]].  (This may only be an issue for ddns-scripts 2.4).+:!: Currently //ddns-scripts// only supports the case where your dynamic subdomain has the same IP address as for your unqualified domain. 
 +Otherwise you will send updates to namecheap.com every "option check_interval" 10 minutes (default) because your FQDN is not validated. 
 +[[https://github.com/openwrt/packages/issues/2348|Proposed solution here, which you can easily implement yourself]]. 
 +This may only be an issue for ddns-scripts 2.4.
  
-Let assume you define two FQDN at your domain "example.com": "%%www.example.com%%" and "%%ftp.example.com%%"\\+Let assume you define two FQDN at your domain "example.com": "%%www.example.com%%" and "%%ftp.example.com%%".
 To update only your domain record "example.com": To update only your domain record "example.com":
 +
 <code> <code>
 service_name namecheap.com service_name namecheap.com
Line 708: Line 854:
 password [Your password] password [Your password]
 </code> </code>
 +
 To update for example only your "%%ftp.example.com%%" host: To update for example only your "%%ftp.example.com%%" host:
 +
 <code> <code>
 service_name namecheap.com service_name namecheap.com
Line 715: Line 863:
 password [Your password] password [Your password]
 </code> </code>
 +
 To update all to the same IP address: To update all to the same IP address:
  
 NOTE: For namecheap updating multiple subdomains is NOT working nowadays, you have to make one request per subdomain, so configure one section per subdomain. https://www.namecheap.com/support/knowledgebase/article.aspx/29/11/how-do-i-use-a-browser-to-dynamically-update-the-hosts-ip#comment-936527059: NOTE: For namecheap updating multiple subdomains is NOT working nowadays, you have to make one request per subdomain, so configure one section per subdomain. https://www.namecheap.com/support/knowledgebase/article.aspx/29/11/how-do-i-use-a-browser-to-dynamically-update-the-hosts-ip#comment-936527059:
 +
 <code> <code>
 service_name namecheap.com service_name namecheap.com
Line 727: Line 877:
  
 ==== noip.com ==== ==== noip.com ====
-Last updated: 2015-07-21\\ +Last updated: 2024-10-03
-[[http://www.noip.com/|Homepage]] -- [[http://www.noip.com/support/|SupportCenter]]+
  
-:!**Starting CC 15.05** do not forget to additional install //ddns-scripts_no-ip_com// package.+[[http://www.noip.com/ | Homepage]] -- [[http://www.noip.com/support| SupportCenter]] -- [[https://www.noip.com/integrate/request/ | Dynamic DNS API]]
  
-The default is to use your '''username''' and '''password''' as normal inside //ddns-scripts// together with '''service_name' 'no-ip.com''' or '''noip.com'''.+:!: Install the [[packages:pkgdata:ddns-scripts-noip]] package. 
 + 
 +The default is to use ''username'' and ''password'' as normal inside //ddns-scripts// together with ''service_name no-ip.com''.
  
 If you want to update multiple hosts inside one configuration/section you need the following settings: If you want to update multiple hosts inside one configuration/section you need the following settings:
 +
 <code> <code>
 service_name delete / --custom-- service_name delete / --custom--
Line 749: Line 901:
  
 ==== spdyn.de (old spdns.de) ==== ==== spdyn.de (old spdns.de) ====
-Last updated: 2016-08-02\\+Last updated: 2016-08-02 
 [[http://spdyn.de/|Homepage]] -- [[http://wiki.securepoint.de/index.php/SPDNS_FAQ|Wiki/FAQ]] (German only) [[http://spdyn.de/|Homepage]] -- [[http://wiki.securepoint.de/index.php/SPDNS_FAQ|Wiki/FAQ]] (German only)
  
-The web-pages of //spdns.de// are now reachable at //spdyn.de//.\\ +The web-pages of //spdns.de// are now reachable at //spdyn.de//
-Currently updates send to //update.spdns.de// pages are still handled but produce warnings in DDNS update log at the provder.\\+Currently updates send to //update.spdns.de// pages are still handled but produce warnings in DDNS update log at the provder.
 Created accounts and domains at //spdns.de// are still working without any problems. Created accounts and domains at //spdns.de// are still working without any problems.
  
-The default is to use your '''username''' and '''password''' as normal inside //ddns-scripts// together with '''service_name' 'spdyn.de'''.\\ +The default is to use your ''username'' and ''password'' as normal inside //ddns-scripts// together with ''service_name spdyn.de''
-If you want to use Update-Token, keep in mind that this token can only update the host it is generated for.\\+If you want to use Update-Token, keep in mind that this token can only update the host it is generated for.
 Use this settings: Use this settings:
 +
 <code> <code>
 service_name spdyn.de service_name spdyn.de
Line 765: Line 919:
 password [The token generated for this hostname] password [The token generated for this hostname]
 </code> </code>
 +
 If you want to update multiple hosts inside one configuration/section you need the following settings (Update-Token doesn't work): If you want to update multiple hosts inside one configuration/section you need the following settings (Update-Token doesn't work):
 +
 <code> <code>
 service_name delete / --custom-- service_name delete / --custom--
Line 779: Line 935:
 </code> </code>
  
-====tunnelbroker.net====+==== tunnelbroker.net ====
 Hurricane Electric provides a free IPv6inIPv4 tunnel through Tunnel Broker that demands a permanent IP or a real-time updated one. Hurricane Electric provides a free IPv6inIPv4 tunnel through Tunnel Broker that demands a permanent IP or a real-time updated one.
-From its [[https://tunnelbroker.net/|homepage]]: "Our free tunnel broker service enables you to reach the IPv6 Internet by tunneling over existing IPv4 connections from your IPv6 enabled host or router to one of our IPv6 routers. To use this service you need to have an IPv6 capable host (IPv6 support is available for most platforms) or router which also has IPv4 (existing Internet) connectivity." +From its [[https://tunnelbroker.net/|homepage]]: "Our free tunnel broker service enables you to reach the IPv6 Internet by tunneling over existing IPv4 connections from your IPv6 enabled host or router to one of our IPv6 routers. 
 +To use this service you need to have an IPv6 capable host (IPv6 support is available for most platforms) or router which also has IPv4 (existing Internet) connectivity."
  
 Apply the following patch to include that service on OpenWRT DDNS Apply the following patch to include that service on OpenWRT DDNS
-<code> + 
--"$(cat /etc/ddns/services 2>/dev/null | grep ipv4.tunnelbroker.net)&& echo "\"tunnelbroker.net\"      \"http://[USERNAME]:[PASSWORD]@ipv4.tunnelbroker.net/nic/update?hostname=[DOMAIN]&myip=[IP]\"     \"good|nochg\"" >> /etc/ddns/services+<code bash
 +grep -q -e "ipv4\.tunnelbroker\.net" /etc/ddns/services \ 
 +&& echo -e "\"tunnelbroker.net\"\t\"http://[USERNAME]:[PASSWORD]@ipv4.tunnelbroker.net/nic/update?hostname=[DOMAIN]&myip=[IP]\"\t\"good|nochg\"" >> /etc/ddns/services
 </code> </code>
 +
 Now you can configure your tunnelbroker ddns: Now you can configure your tunnelbroker ddns:
-<code> + 
-#/etc/config/ddns+<code bash
 +# /etc/config/ddns
 config service 'HE6in4' config service 'HE6in4'
         option service_name  'tunnelbroker.net'         option service_name  'tunnelbroker.net'
Line 802: Line 962:
         option enabled       '1'         option enabled       '1'
 </code> </code>
 +
 +Instead of using a web service, that has the risk of being eventually offline, to detect the public IP, you can detect the [[client#Detecting WAN public IP by script|WAN public IP by this script]].
 +
 +===== Additional forum threads for configuration =====
 +
 +https://forum.openwrt.org/t/enabling-dynamic-dns-is-too-convoluted-difficult/152939
 +
  • Last modified: 2024/12/19 18:26
  • by andrewz