Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-user:services:ddns:client [2021/03/22 21:22] – remove zerigo stokito | docs:guide-user:services:ddns:client [2024/10/05 13:46] – [dynu.com] andrewz | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== DDNS client ====== | ====== DDNS client ====== | ||
| + | See also: [[docs: | ||
| + | |||
| ===== Introduction ===== | ===== Introduction ===== | ||
| DDNS stands for [[wp> | DDNS stands for [[wp> | ||
| Line 15: | Line 17: | ||
| ===== Features ===== | ===== Features ===== | ||
| - | //ddns-scripts// support other special communication functions | + | ddns-scripts support other special communication functions: |
| * Run once, useful for usage with [[docs: | * Run once, useful for usage with [[docs: | ||
| * Set proxy with/ | * Set proxy with/ | ||
| Line 28: | Line 30: | ||
| * [[https:// | * [[https:// | ||
| * [[http:// | * [[http:// | ||
| - | * [[https://dnslookup.me/dynamic-dns/]] | + | * Pick one from the list https://github.com/openwrt/ |
| - | ^ // | + | ^ // |
| - | | [[http:// | + | | [[http:// |
| - | | [[http:// | + | | [[http://afraid.org/|afraid.org]] < |
| - | | [[http://dnsexit.com/|dnsexit.com]] | [[http://dnshome.de/|dnshome.de]] < | + | | all-inkl.com |
| - | | [[http://dnspark.com/|dnspark.com]] | [[http://do.de/|do.de]] < | + | | [[http://changeip.com/|changeip.com]] |
| - | | [[http://duiadns.net/|duiadns.net]] < | + | | [[http://cloudflare.com/|cloudflare.com]] <sup>2) 5) 6)</ |
| - | | dyns.net | dynsip.org | + | | [[http://core-networks.de/|core-networks.de]] < |
| - | | [[http://easydns.com/|easydns.com]] | [[http://editdns.net/|editdns.net]] | [[http://goip.de/|goip.de]] < | + | | [[http://ddnss.de/|ddnss.de]] < |
| - | | [[http://dns.he.net/|he.net]] < | + | | ddo.jp |
| - | | [[http://myonlineportal.net/|myonlineportal.net]] < | + | | desec.io |
| - | | [[http://no-ip.com/|no-ip.com]] < | + | | [[http://dhis.org/|dhis.org]] < |
| - | | [[http://ovh.com/|ovh.com]] | [[http://regfish.de/|regfish.de]] < | + | | [[http://dnsdynamic.org/|dnsdynamic.org]] |
| - | | [[http://sitelutions.com/|sitelutions.com]] | [[http://spdyn.de/|spdyn.de]] < | + | | [[http://dnsexit.com/|dnsexit.com]] |
| - | | [[http://thatip.com/|thatip.com]] | [[http://twodns.de/|twodns.de]] | [[http://variomedia.de/|variomedia.de]] < | + | | [[http://dnshome.de/|dnshome.de]] < |
| - | | [[http://zoneedit.com/|zoneedit.com]] <sup>5)</ | + | | [[http://dnsmax.com/|dnsmax.com]] |
| + | | [[http://dnsomatic.com/|dnsomatic.com]] | ||
| - | - Requires additional package [[packages: | + | - Requires additional package [[packages: |
| - | - Needs additional package [[packages: | + | - Needs additional package [[packages: |
| - | - Directly updates a PowerDNS (or maybe bind server) via nsupdate. | + | - Directly updates a DNS server |
| - | - Needs additional package [[packages: | + | - Needs additional package [[packages: |
| - | - SSL support | + | - Requires |
| - Supports IPv6. | - Supports IPv6. | ||
| Line 58: | Line 61: | ||
| Read their help pages for details and also read provider specific information below. | Read their help pages for details and also read provider specific information below. | ||
| - | ===== Support | + | ===== Web interface instructions |
| - | If you need support, found an issue or only want to request a new extension for the next release, please post your questions/ | + | Set up DDNS client service using web interface. |
| - | | + | - Navigate |
| - | | + | - Press the button |
| - | * [[https:// | + | - Install the packages |
| + | - Install the packages | ||
| + | - Install the provider specific packages '' | ||
| + | - Refresh the page and navigate to **LuCI -> Services -> Dynamic DNS**. | ||
| + | - Use the instances '' | ||
| + | - Modify the fields you need to change and check the **Enabled** option. | ||
| + | - Click **Save & Apply** button to save changes. | ||
| - | A full list of supported settings, some not supported by LuCI: | + | ===== Command-line instructions |
| - | * UCI documentation -> [[docs: | + | Install |
| - | + | Also provide SSL support with '' | |
| - | ===== Installation | + | |
| - | ==== Web interface ==== | + | |
| - | * Login into your router through your browser. | + | |
| - | * Navigate to **LuCI -> System -> Software** | + | |
| - | * Press button **Update Lists** to update internal lists of available packages. | + | |
| - | * Install | + | |
| - | * You might need to install | + | |
| - | * Refresh the page and navigate to **LuCI | + | |
| - | + | ||
| - | ==== Command-line interface ==== | + | |
| - | To install // | + | |
| - | You might need to install provider specific packages // | + | |
| <code bash> | <code bash> | ||
| Line 84: | Line 81: | ||
| opkg install ddns-scripts | opkg install ddns-scripts | ||
| opkg install ddns-scripts_xxxxx | opkg install ddns-scripts_xxxxx | ||
| - | </ | ||
| - | |||
| - | ==== SSL support ==== | ||
| - | By default // | ||
| - | To perform DDNS updates over https (SSL), you will need to install the [[packages: | ||
| - | |||
| - | If both '' | ||
| - | Default is '' | ||
| - | |||
| - | You can install either via LuCI from the menu select **LuCI -> System -> Software** and search for '' | ||
| - | |||
| - | <code bash> | ||
| - | opkg update | ||
| opkg install wget ca-certificates | opkg install wget ca-certificates | ||
| opkg install curl ca-bundle | opkg install curl ca-bundle | ||
| - | opkg install ca-certificates | ||
| </ | </ | ||
| - | :!: If you, also for other software, need all certificates in one file or you want to update CA certificates regularly, then do **NOT** install package. | + | Proceed with setting up the service |
| - | '' | + | |
| - | Install latest CA certificates (in one file) using console: | + | |
| - | + | ||
| - | <code bash> | + | |
| - | mkdir -p / | + | |
| - | curl -o / | + | |
| - | wget --no-check-certificate -O / | + | |
| - | </ | + | |
| ===== Configuration ===== | ===== Configuration ===== | ||
| - | ==== Basics ==== | ||
| ddns-scripts are designed to update one host per configuration/ | ddns-scripts are designed to update one host per configuration/ | ||
| To update multiple hosts or providers or IPv4 and IPv6 for the same host you need to define separate configurations/ | To update multiple hosts or providers or IPv4 and IPv6 for the same host you need to define separate configurations/ | ||
| 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 '' | + | A possible solution for this option is to use '' |
| - | Have a look at [[# | + | Have a look at [[# |
| - | + | ||
| - | The main settings you need to set are (all other normally work fine with the defaults): | + | |
| - | | Service name | the DDNS service provider to use | | + | |
| - | | Host/Domain | your [[wp> | + | |
| - | | Username | username or other parameter to use as username (send urlencoded) | | + | |
| - | | Password | password or other parameter to use as password (send urlencoded)\\ :!: **__including BB 14.07__** Ensure this password does not have " | + | |
| - | | Interface | network name (i.e. wan, wan6) used by OpenWrt hotplug event system to start // | + | |
| - | + | ||
| - | :!: **__since DD (trunk)__** the following main settings need to be set: | + | |
| - | | Service name | the DDNS service provider to use | | + | |
| - | | Lookup Host | ONE of your defined [[wp> | + | |
| - | | Host/Domain | mostly same as '' | + | |
| - | | Username | username or other parameter to use as username (send urlencoded) | | + | |
| - | | Password | password or other parameter to use as password (send urlencoded) | | + | |
| - | | Interface | network name (i.e. wan, wan6) used by OpenWrt hotplug event system to start // | + | |
| - | + | ||
| - | After fresh installation a configuration/ | + | |
| - | You could delete them and define your own. | + | |
| - | + | ||
| - | :!: **Please heed the following important hints:** | + | |
| - | * It is NOT allowed to use '' | + | |
| - | * A full list of supported settings (some not supported by LuCI) you will find in [[docs: | + | |
| - | * Always keep in mind the [[# | + | |
| - | * Don't forget to enable your configuration/ | + | |
| - | * You need minimum one enabled configuration/ | + | |
| - | * You need to enable //ddns// service to enable updates being sent on reboot and hotplug events! | + | |
| - | * __// | + | |
| - | + | ||
| - | ==== Web interface ==== | + | |
| - | * Log into your router through your browser. | + | |
| - | * From the menu select **Services -> Dynamic DNS**. | + | |
| - | * Navigate to the configuration/ | + | |
| - | * 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/ | + | ==== Web interface instructions ==== |
| - | | + | The main settings you need to set: |
| - | | + | | DDNS Service provider | Service provider name as it is known to OpenWrt |
| - | * Click [Add] button. | + | | Lookup Hostname | The [[wp> |
| - | * Modify the fields you need to change. | + | | |
| - | * Don't forget to check the '' | + | | |
| - | * Click [Save & Apply] button to save changes. | + | | |
| + | | Interface | Network name used by OpenWrt hotplug event system | ||
| - | '' | + | * It is not allowed to use '' |
| - | If your provider does not require | + | * A full list of supported settings (some not supported by LuCI) you will find in [[docs: |
| + | * Always keep in mind the [[# | ||
| + | * Don't forget to enable | ||
| + | * You need minimum | ||
| + | * You need to enable //ddns// service to enable updates being sent on reboot and hotplug events. | ||
| + | * Do not change the files ''/ | ||
| === SSL support === | === SSL support === | ||
| - | Options to configure HTTPS communication are only available if '' | + | Options to configure HTTPS communication are only available if '' |
| * Check **Use HTTP Secure** option. Additional field **Path to CA-Certificate** is shown with it's default setting. | * Check **Use HTTP Secure** option. Additional field **Path to CA-Certificate** is shown with it's default setting. | ||
| - | * If you have installed '' | + | * If you have installed '' |
| - | * If you have installed CA certificates in one file from [[# | + | * If you have installed CA certificates in one file from [[# |
| - | * If you like to use other certificate you need to set here the full path to the certificate including file name. (''/ | + | * If you like to use other certificate you need to set here the full path to the certificate including file name, e.g. ''/ |
| - | * If your certificates are stored in a different path, set here the path where your certificates are located. | + | * If your certificates are stored in a different path, set here the path where your certificates are located, e.g. ''/ |
| - | * Click [Save & Apply] button to save changes. | + | * Click **Save & Apply** button to save changes. |
| === Custom service === | === Custom service === | ||
| If you want to use a DDNS provider currently not listed or you want to update multiple hosts within one configuration/ | If you want to use a DDNS provider currently not listed or you want to update multiple hosts within one configuration/ | ||
| - | * Choose | + | * Choose |
| - | * Fill in the URL you like to use. :!: Please read URL syntax description [[# | + | * Fill in the URL you like to use. :!: Please read URL syntax description [[# |
| - | * Click [Save & Apply] button 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:// | :!: **If you found a DDNS provider not listed or with additional IPv6 support or with changed update URL please open an issue at [[https:// | ||
| - | ==== Command-line | + | ==== Command-line |
| The easiest way to configure // | The easiest way to configure // | ||
| Other editors as '' | Other editors as '' | ||
| Line 304: | Line 249: | ||
| | http:// | | http:// | ||
| | http:// | | http:// | ||
| - | | http:// | + | | http:// |
| - | | http:// | + | | http:// |
| | http:// | | http:// | ||
| | http:// | | http:// | ||
| Line 332: | Line 277: | ||
| - Users reported timeout problems, use links in the line below (...:8245). | - Users reported timeout problems, use links in the line below (...:8245). | ||
| - Alias of *.dyndns.com. | - Alias of *.dyndns.com. | ||
| + | |||
| + | ==== WAN IP via own PHP script ==== | ||
| + | If you don't like to use one of the above you can write your own. Here is a sample script in PHP which can easily be deployed on any web hosting: | ||
| + | |||
| + | < | ||
| + | < | ||
| + | < | ||
| + | <?php | ||
| + | echo $_SERVER[' | ||
| + | ?> | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| ==== Detecting WAN IP with script ==== | ==== Detecting WAN IP with script ==== | ||
| Line 343: | Line 301: | ||
| . / | . / | ||
| network_flush_cache | network_flush_cache | ||
| - | network_find_wan NET_IF | + | for IPV in 4 6 |
| - | network_find_wan6 NET_IF6 | + | do |
| - | network_get_ipaddr | + | eval network_find_wan${IPV%4} |
| - | network_get_ipaddr6 NET_ADDR6 | + | eval network_get_ipaddr${IPV%4} NET_ADDR |
| echo " | echo " | ||
| - | echo " | + | done |
| EOF | EOF | ||
| chmod +x / | chmod +x / | ||
| Line 392: | Line 350: | ||
| ==== Run manually ==== | ==== Run manually ==== | ||
| - | === Web interface === | + | === Web interface |
| To **check** running // | To **check** running // | ||
| - | Look for something like ''/ | + | Look for something like ''/ |
| To **stop** a desired process press the **Terminate** or **Kill** button. | To **stop** a desired process press the **Terminate** or **Kill** button. | ||
| Line 404: | Line 362: | ||
| You can additionally enable/ | You can additionally enable/ | ||
| - | === Command-line | + | === Command-line |
| From console command line you could create an '' | From console command line you could create an '' | ||
| This will start all enabled ddns configurations/ | This will start all enabled ddns configurations/ | ||
| Line 417: | Line 375: | ||
| <code bash> | <code bash> | ||
| - | / | + | / |
| </ | </ | ||
| + | Note that verbosity can also be increased, which is very useful for debugging when creating your own ddns client scripts. e.g. | ||
| + | <code bash> | ||
| + | / | ||
| + | </ | ||
| + | see ''/ | ||
| - | To **start** all // | + | To **stop** one configuration/section you need to find it's PID and kill it manually e.g. |
| <code bash> | <code bash> | ||
| - | sh / | + | pgrep -f -a dynamic |
| - | start_daemon_for_all_ddns_sections wan | + | kill <pid of matching dynamic_dns_updater.sh process> |
| </ | </ | ||
| - | To **stop** one configuration/ | ||
| + | To **start** all // | ||
| <code bash> | <code bash> | ||
| - | killall | + | / |
| - | pgrep -f -a dynamic | + | </ |
| - | pkill dynamic | + | |
| + | **All** configured ddns services in ''/ | ||
| + | < | ||
| + | service ddns restart | ||
| </ | </ | ||
| Line 468: | Line 433: | ||
| | 3 | warning, errors | | | 3 | warning, errors | | ||
| | 4 | errors | | | 4 | errors | | ||
| - | | :!: Critical errors forcing // | + | | :!: Critical errors forcing // |
| Line 603: | Line 568: | ||
| ==== cloudflare.com ==== | ==== cloudflare.com ==== | ||
| - | Last updated: | + | Last updated: |
| [[https:// | [[https:// | ||
| + | |||
| + | As of OpenWrt version 22.03.0, // | ||
| + | API Tokens provide a new way to authenticate with the Cloudflare API. | ||
| + | |||
| + | [[https:// | ||
| + | You can also " | ||
| + | These allow for scoped and permissioned access to resources and use the RFC compliant [[rfc> | ||
| + | For more information on Token vs Key see the [[https:// | ||
| + | |||
| + | < | ||
| + | service_name cloudflare.com-v4 | ||
| + | domain [Your domain, here: example.com] | ||
| + | username Bearer | ||
| + | password [Your API token] | ||
| + | </ | ||
| To use subdomains (CNAME or A records), use the format below when filling your credentials: | To use subdomains (CNAME or A records), use the format below when filling your credentials: | ||
| Line 618: | Line 598: | ||
| * If using Cloudflare' | * If using Cloudflare' | ||
| - | The version of // | ||
| - | API Tokens provide a new way to authenticate with the Cloudflare API. | ||
| - | They allow for scoped and permissioned access to resources and use the RFC compliant [[rfc> | ||
| - | For more information on Token vs Key see the [[https:// | ||
| - | < | ||
| - | service_name cloudflare.com-v4 | ||
| - | domain [Your domain, here: example.com] | ||
| - | username Bearer | ||
| - | password [Your API token] | ||
| - | </ | ||
| ==== dnsomatic.com ==== | ==== dnsomatic.com ==== | ||
| - | Last updated: | + | Last updated: |
| - | DNS-O-Matic provides you a free and easy way to announce your dynamic IP changes to multiple services with a single update. | + | DNS-O-Matic provides you a free, easy and secure |
| 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. | 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:// | [[https:// | ||
| - | You need to change your OpenDNS password to one that doesn' | + | 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' |
| + | |||
| + | If you would like to make sure your SSL connection is verified, then [[: | ||
| + | and set the path to **/ | ||
| To update all services registered with DNS-O-Matic in one configuration/ | To update all services registered with DNS-O-Matic in one configuration/ | ||
| Line 643: | Line 616: | ||
| # / | # / | ||
| config service ' | config service ' | ||
| - | option lookup_host | + | option lookup_host |
| option interface | option interface | ||
| option ip_source | option ip_source | ||
| - | option ip_url | + | option ip_url |
| option use_https | option use_https | ||
| + | option cacert | ||
| option service_name | option service_name | ||
| option domain | option domain | ||
| Line 662: | Line 636: | ||
| uci set ddns.dnsomatic.interface=' | uci set ddns.dnsomatic.interface=' | ||
| uci set ddns.dnsomatic.ip_source=' | uci set ddns.dnsomatic.ip_source=' | ||
| - | uci set ddns.dnsomatic.ip_url=' | + | uci set ddns.dnsomatic.ip_url=' |
| uci set ddns.dnsomatic.use_https=' | uci set ddns.dnsomatic.use_https=' | ||
| uci set ddns.dnsomatic.service_name=' | uci set ddns.dnsomatic.service_name=' | ||
| Line 674: | Line 648: | ||
| ==== duckdns.org ==== | ==== duckdns.org ==== | ||
| - | Last updated: | + | Last updated: |
| - | [[http:// | + | For detailed instructions, |
| - | FIXME | + | ==== dynu.com ==== |
| - | There is another | + | Last updated: 2024-10-05 |
| - | I take over the link during rewriting this wiki page. | + | |
| + | [[http:// | ||
| - | Inside LuCI web UI select **--custom--** | + | It works out of the box in the standard most common setup with a single user-defined // |
| - | :!: Be sure you install ssl support. | + | |
| - | Additional use update_url and settings from below: | + | In order to update v4 or v6 IP address for a // |
| < | < | ||
| - | update_url http: | + | service_name delete |
| - | domain [Your FQDN] | + | update_url api.dynu.com/nic/update?hostname=[DOMAIN]&alias=[PARAMENC]&myipv6=[IP]& |
| - | username [Your Host without | + | domain [your 3rd level domain, like "mydomain.example.com"] |
| - | password [Your token] | + | paramenc [your alias, like " |
| - | use_https 1 | + | username [dummy, not used, but Luci expects something |
| - | cacert [path to certificate file or directory] | + | password [your update token] |
| </ | </ | ||
| + | This will update IPv6 address for '' | ||
| + | |||
| + | The //update token// used as a password in both standard and custom configurations is an MD5/SHA256 hash of "IP Update Password" | ||
| + | |||
| + | The hash can be generated on their [[https:// | ||
| + | |||
| ==== freedns.afraid.org ==== | ==== freedns.afraid.org ==== | ||
| Line 782: | Line 762: | ||
| ==== he.net ==== | ==== he.net ==== | ||
| - | Last updated: | + | Last updated: |
| [[https:// | [[https:// | ||
| + | [[https:// | ||
| - | FIXME | + | Background (who they are): Hurricane Electric (referred to as HE.net below) |
| - | There is another | + | |
| - | I take over the link during rewriting | + | 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]/ |
| + | |||
| + | 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. | ||
| + | |||
| + | If you don't have an HE.net account, you will need to [[https:// | ||
| + | |||
| + | If you don't already have a domain (or subdomain) pointing to HE.net: | ||
| + | * Go to the [[https:// | ||
| + | * 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), | ||
| + | * 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 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:// | ||
| + | |||
| + | *Note:* In order for a zone to be accepted for addition to HE.net' | ||
| + | |||
| + | Lastly, if you want to (it's optional) protect the update-requests that the ddns-service does, with TLS, you can see the [[client# | ||
| + | The following settings have been tested/ | ||
| + | |||
| + | In the below example config, the (sub-)domain pointing to HE.net nameservers is " | ||
| - | Use the following settings: | ||
| < | < | ||
| - | service_name he.net | + | # / |
| - | domain [Your FQDN] | + | config service ' |
| - | username [Your FQDN] | + | option |
| - | password [Your password] | + | |
| + | option | ||
| + | | ||
| + | option use_ipv6 ' | ||
| + | option | ||
| + | | ||
| + | option ip_source ' | ||
| + | option ip_network ' | ||
| + | option interface ' | ||
| + | option use_syslog ' | ||
| + | option check_unit ' | ||
| + | option force_unit ' | ||
| + | option retry_unit ' | ||
| </ | </ | ||
| + | |||
| + | More info about how this works underneath the covers: https:// | ||
| + | |||
| + | Note: There is another (older) doc here: [[docs: | ||
| + | |||
| ==== mythic-beasts.com ==== | ==== mythic-beasts.com ==== | ||
| Line 855: | Line 877: | ||
| ==== noip.com ==== | ==== noip.com ==== | ||
| - | Last updated: | + | Last updated: |
| - | [[http:// | + | [[http:// |
| - | :!: Install the [[packages: | + | :!: Install the [[packages: |
| - | The default is to use your '' | + | The default is to use '' |
| If you want to update multiple hosts inside one configuration/ | If you want to update multiple hosts inside one configuration/ | ||
| Line 942: | Line 964: | ||
| Instead of using a web service, that has the risk of being eventually offline, to detect the public IP, you can detect the [[client# | Instead of using a web service, that has the risk of being eventually offline, to detect the public IP, you can detect the [[client# | ||
| + | |||
| + | ===== Additional forum threads for configuration ===== | ||
| + | |||
| + | https:// | ||