Differences

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

doc:howto:ddns.client [2012/09/27 16:13]
written_direcon
doc:howto:ddns.client [2013/04/30 20:54] (current)
stevenharperuk Added DuckDNS
Line 15: Line 15:
Let it update, go back to Software. Find luci-app-ddns. Install it, then when it says the installation is finished, it's installed! Let it update, go back to Software. Find luci-app-ddns. Install it, then when it says the installation is finished, it's installed!
-Just press any other link at the openwrt WebUI, and the WebUI will refresh itself and Dynamic DNS will appear under Services > Dynamic DNS+Just press any other link at the openwrt WebUI, and the WebUI will refresh itself and Dynamic DNS will appear under Services > Dynamic DNS. If those tabs don't show up, reboot the machine.
==== Step 2, configuration ==== ==== Step 2, configuration ====
Line 62: Line 62:
  * http://freedns.afraid.org   * http://freedns.afraid.org
  * http://dnsdynamic.org   * http://dnsdynamic.org
 +  * http://duckdns.org  free - generated config on site =)
  * Any other service that can update when some URL is accessed.  The script is quite versatile.   * Any other service that can update when some URL is accessed.  The script is quite versatile.
Line 86: Line 87:
==== Configuration ==== ==== Configuration ====
-The configuration is stored in /etc/config/ddns which contains more thorough documentation.+The configuration is stored in **/etc/config/ddns** which contains more thorough documentation.
In order to enable Dynamic DNS you need at least one section, and in that section the "enabled" option must be set to one. In order to enable Dynamic DNS you need at least one section, and in that section the "enabled" option must be set to one.
Line 95: Line 96:
  * domain (set this to all.dnsomatic.com for DNS-o-Matic)   * domain (set this to all.dnsomatic.com for DNS-o-Matic)
  * username   * username
-  * password+  * password (sometimes it is the api token, not your login password)
  * IP source (wan, eth0, web)   * IP source (wan, eth0, web)
Optionally, thse following may be specified: Optionally, thse following may be specified:
Line 120: Line 121:
        #option ip_interface    "eth0.1"         #option ip_interface    "eth0.1"
        #option ip_source      "web"         #option ip_source      "web"
-        #option ip_url          "http://automation.whatismyip.com/n09230945.asp"+        #option ip_url          "http://ipv4.wtfismyip.com/text"
        #option update_url      "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]"         #option update_url      "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]"
 +        #option use_https      "1"
 +        #option cacert          "/etc/ssl/certs/cacert.pem"
</code> </code>
-A short example for a dyndns.org service to configure via UCI CLI:+A short example for a **dyndns.org** service to configure via UCI CLI:
<code> <code>
Line 134: Line 137:
root@OpenWrt:~# uci commit ddns root@OpenWrt:~# uci commit ddns
root@OpenWrt:~# ACTION=ifup INTERFACE=wan /sbin/hotplug-call iface root@OpenWrt:~# ACTION=ifup INTERFACE=wan /sbin/hotplug-call iface
 +</code>
 +
 +
 +An example for **noip.com** service that updates via pinging web url:
 +<code>
 +config 'service' 'myddns'
 + option 'interface' 'wan'
 + option 'force_interval' '72'
 + option 'force_unit' 'hours'
 + option 'check_interval' '10'
 + option 'check_unit' 'minutes'
 + option 'enabled' '1'
 + option 'service_name' 'no-ip.com'
 + option 'username' 'YOUR-USERNAME'
 + option 'password' 'YOUR-PASSWORD'
 + option 'ip_source' 'web'
 + option 'ip_url' 'http://[USERNAME]:[PASSWORD]@dynupdate.no-ip.com/nic/update?hostname=[DOMAIN]&myip=[IP]'
 + option 'domain' 'YOUR-DOMAIN.no-ip.org'
</code> </code>
Line 159: Line 180:
</code> </code>
Note: //myddns// is the name of the service config entry in ///etc/config/ddns// file. Note: //myddns// is the name of the service config entry in ///etc/config/ddns// file.
 +
 +If you only see the update_url= output you forgot the enable flag for the service.
For example if you see //badauth// in //Update Output//, you have to change your password which contains only letters and numbers. Because busybox's (v1.15.3) wget implementation has an issue handling encoded URLs. For example if you see //badauth// in //Update Output//, you have to change your password which contains only letters and numbers. Because busybox's (v1.15.3) wget implementation has an issue handling encoded URLs.
 +
 +Sometimes the scripts mess up and many instances of the updater will be fired. In this case, use this command to kill them all and start again
 +<code>
 +root@OpenWrt:~# ps | grep dynami[c] | awk '{print $1}' | xargs kill
 +root@OpenWrt:~# ACTION=ifup INTERFACE=wan /sbin/hotplug-call iface
 +</code>
==== Tweaks ==== ==== Tweaks ====
Line 204: Line 233:
</code> </code>
Note that you need to download a Certificate Authority bundle as curl's pre-packaged bundle is out of date. Curl does maintain a current CA bundle here: http://curl.haxx.se/ca/ Note that you need to download a Certificate Authority bundle as curl's pre-packaged bundle is out of date. Curl does maintain a current CA bundle here: http://curl.haxx.se/ca/
 +
 +===Curl SSLv2,3 Support===
 +If your DDNS provider is using SSLv2 or SSLv3 Curl will throw error code 35 because it can't connect unless you specify the correct SSL version.
 +To fix this, you must modify /usr/lib/ddns/dynamic_dns_updater.sh as such:
 +
 +For SSLv2 replace --sslv3 with --sslv2
 +
 +Find this string of code:
 +<code>
 +retrieve_prog="${retrieve_prog}--cacert $cacert "
 +</code>
 +
 +Replace it with the following:
 +<code>
 +retrieve_prog="${retrieve_prog}--sslv3 --cacert $cacert "
 +</code>
 +
 +Find this string of code:
 +<code>
 +retrieve_prog="${retrieve_prog}--capath $cacert "
 +</code>
 +
 +Replace it with the following:
 +<code>
 +retrieve_prog="${retrieve_prog}--sslv3 --capath $cacert "
 +</code>
===Using wget=== ===Using wget===
Line 244: Line 299:
  * [[http://forum.openwrt.org/viewtopic.php?id=14040|exobyte's Kamikaze dyndns.org script (based of JimWright's)]]   * [[http://forum.openwrt.org/viewtopic.php?id=14040|exobyte's Kamikaze dyndns.org script (based of JimWright's)]]
  * run nsupdate from /etc/udhcpc.user to update an authoritative master configured for DDNS.   * run nsupdate from /etc/udhcpc.user to update an authoritative master configured for DDNS.
- 

Back to top

doc/howto/ddns.client.1348755189.txt.bz2 · Last modified: 2012/09/27 16:13 by written_direcon