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 [2024/10/05 10:49] – [bind / nsupdate] andrewzdocs:guide-user:services:ddns:client [2024/10/05 13:46] – [dynu.com] andrewz
Line 567: Line 567:
 </code> </code>
  
-==== bind / nsupdate ==== 
-Last updated: 2021-10-23 
- 
-If you have your own domain and are running ''bind'' as your primary DNS server, you can use the [[packages:pkgdata:ddns-scripts-nsupdate]] package to update ''bind''. There are two parts: 
- 
-  - Configure ''bind'' to accept DNS updates using TSIG. 
-  - Configure OpenWr DDNS client to send updates to ''bind'' when the IP changes. 
- 
-In the below example, we will use the following parameters: 
-  * Domain name: ''example.org'' 
-  * DNS Server: ''ns.example.org'' 
-  * Router hostname: ''openwrt.example.org'' 
- 
-=== Configure Bind === 
-The first step is to set up ''bind'' to allow updates to the ''A'' (IPv4) and ''AAAA'' (IPv6) records for **openwrt.example.org**. To do this, log onto your DNS server and run ''/usr/sbin/ddns-confgen -s openwrt.example.org''. This will generate the key and shared secret that will be used to update DNS. You should see output similar to the following: 
-<code> 
-$ /usr/sbin/ddns-confgen -s openwrt.example.org 
-# To activate this key, place the following in named.conf, and 
-# in a separate keyfile on the system or systems from which nsupdate 
-# will be run: 
-key "ddns-key.openwrt.example.org" { 
-        algorithm hmac-sha256; 
-        secret "B1m6Xb1ngrEeNFSExr8homgfzeN8kWIBkJpnoAHF5D8="; 
-}; 
- 
-# Then, in the "zone" statement for the zone containing the 
-# name "openwrt.example.org", place an "update-policy" statement 
-# like this one, adjusted as needed for your preferred permissions: 
-update-policy { 
-          grant ddns-key.openwrt.example.org name openwrt.example.org ANY; 
-}; 
- 
-# After the keyfile has been placed, the following command will 
-# execute nsupdate using this key: 
-nsupdate -k <keyfile> 
-</code> 
- 
-The two important things to note for the second part of the setup, on openwrt, are: 
-  - Key Name: **ddns-key.openwrt.example.org** 
-  - Shared Secret (Base64 encoded): **B1m6Xb1ngrEeNFSExr8homgfzeN8kWIBkJpnoAHF5D8=** (yours will differ as it is randomly generated) 
- 
-You then need to do as the comments in the output say and put both the ''key'' block and the ''update-policy'' block in the proper places within your bind configuration file (generally ''/etc/bind/named.conf.local'' or ''/etc/bind/named.conf'') and reload/restart bind. 
- 
-To test that bind is now properly configured you can run a test as follows: 
-<code> 
-$ nsupdate 
-server ns.example.org 
-key hmac-sha256:ddns-key.openwrt.example.org B1m6Xb1ngrEeNFSExr8homgfzeN8kWIBkJpnoAHF5D8= 
-update del openwrt.example.org A 
-update add openwrt.example.org 600 A 10.10.10.10 
-show 
-send 
-answer 
-quit 
-$ dig @ns.example.org openwrt.example.org A 
-</code> 
- 
-You should see no errors, and the ''10.10.10.10'' IPv4 address returned for **openwrt.example.org**. If so, you are ready to move on to the next step which is to configure DDNS on OpenWRT to send updates to bind. 
- 
-See also: [[https://bind9.readthedocs.io/en/latest/advanced.html#tsig|BIND 9 Administrator Reference Manual]] 
- 
-=== Configure DDNS client === 
- 
-Using  LuCI Web UI: install [[packages:pkgdata:luci-app-ddns]] package, then go to **Services** -> **Dynamic DNS**. In the bottom section, Services, you will see two example configurations: one for IPv4 and one for IPv6. Click the **Edit** button, and enter the following information (based on the example config from above; but, use your own values): 
-  * Lookup Hostname: **openwrt.example.org** 
-  * DDNS Service provider: **bind-nsupdate** 
-  * Domain: **openwrt.example.org** 
-  * Username: **hmac-sha256:ddns-key.openwrt.example.org** 
-  * Password: **B1m6Xb1ngrEeNFSExr8homgfzeN8kWIBkJpnoAHF5D8=** 
-  * DNS-Server (on the Advanced Settings tab): **ns.example.org** 
- 
-Then click **Save**, followed by **Save & Apply**. 
- 
-Congratulations, if you did everything right, OpenWrt should now update DNS with the current IP Address for your router. 
- 
-If you are not using LuCI and want to configure manually from the command line, you will need to edit ''/etc/config/ddns'' as follows (using the example config from above): 
-<file [enable_line_numbers="true"]> 
-config ddns 'global' 
-        option ddns_dateformat '%F %R' 
-        option ddns_loglines '250' 
-        option ddns_rundir '/var/run/ddns' 
-        option ddns_logdir '/var/log/ddns' 
- 
-config service 'myddns_ipv4' 
-        option enabled '1' 
-        option lookup_host 'openwrt.example.org' 
-        option use_ipv6 '0' 
-        option service_name 'bind-nsupdate' 
-        option domain 'openwrt.example.org' 
-        option ip_source 'network' 
-        option ip_network 'wan' 
-        option interface 'wan' 
-        option dns_server 'ns.example.org' 
-        option use_syslog '2' 
-        option check_unit 'minutes' 
-        option force_unit 'minutes' 
-        option retry_unit 'seconds' 
-        option username 'hmac-sha256:ddns-key.openwrt.example.org' 
-        option password 'B1m6Xb1ngrEeNFSExr8homgfzeN8kWIBkJpnoAHF5D8=' 
-</file> 
-You can then add another stanza for IPv6, by turning on ''use_ipv6'' and changing ''ip_network'' and ''interface'' to **wan6**. 
 ==== cloudflare.com ==== ==== cloudflare.com ====
 Last updated: 2022-09-11 Last updated: 2022-09-11
Line 752: Line 651:
  
 For detailed instructions, see [[docs:guide-user:services:ddns:duckdns|DuckDNS DDNS Client]]. 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:
 +
 +<code>
 +service_name delete / --custom--
 +update_url api.dynu.com/nic/update?hostname=[DOMAIN]&alias=[PARAMENC]&myipv6=[IP]&password=[PASSWORD]
 +domain [your 3rd level domain, like "mydomain.example.com"]
 +paramenc [your alias, like "myhost"]
 +username [dummy, not used, but Luci expects something to be set]
 +password [your update token]
 +</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 modified: 2024/12/19 18:26
  • by andrewz