configure.rst 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. Configuring your dynDNS Client
  2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3. Here's how to configure your client to send your IP address to our servers so
  4. that we can publish it in the DNS. This works with both your own domains and
  5. with dynDNS domains registered with us under dedyn.io. Depending on your use
  6. case, one of the following options might be easier than the others.
  7. To update your dynDNS IP address, there are several options:
  8. Option 1: Use Your Router
  9. `````````````````````````
  10. For most folks, using the integrated dynDNS client of their router will be
  11. easiest. Here are two ways how to configure it.
  12. Use your router's deSEC provider
  13. ********************************
  14. Some routers have support for deSEC out of the box, and you just need to select
  15. the right option ("deSEC", "desec.io", "dedyn", or similar). For example, if
  16. you run a router with the OpenWRT operation system, watch out for the
  17. "desec.io" provider.
  18. Custom Configuration
  19. ********************
  20. If your router does not have deSEC preconfigured, the configuration procedure
  21. will depend on the specific type of router which is why we can't provide a
  22. tutorial for all of them. However, most of the time it boils down to enter the
  23. following details in your router configuration:
  24. - Update Server ``update.dedyn.io``, or Update URL ``https://update.dedyn.io/``
  25. - Username (the full name of the domain you want to update, e.g. yourname.dedyn.io)
  26. - Hostname (same as your username)
  27. - Token secret (long random string for authentication, displayed after sign-up)
  28. **Advanced API users:** The dynDNS token technically is a regular API token
  29. with permissions restricted to DNS management (but not account management).
  30. IPv6 Support
  31. ------------
  32. There is a chance that your router already properly supports pushing its IPv6
  33. address to us. If it does not, you can try to let our servers determine your
  34. IPv6 address by using IPv6 to connect. To see if this method works for you,
  35. modify the "Update Server" or "Update URL" setting in your router's
  36. configuration to ``update6.dedyn.io`` and ``https://update6.dedyn.io/``,
  37. respectively.
  38. Note that when using this update server, your IPv4 address will be deleted from
  39. the DNS, and your domain will operate in IPv6-only mode. (For an explanation
  40. why that is the case, see :ref:`determine-ip-addresses`.) It is **not** possible
  41. to set up IPv4 and IPv6 by using both update servers in an alternating fashion.
  42. To update both your IPv4 and IPv6 address at the same time, most routers need
  43. to be configured with an update URL that provides both IP addresses via query string
  44. parameters, e.g. ``https://update.dedyn.io/?myipv4=1.2.3.4&myipv6=fd08::1234``,
  45. with the IP addresses replaced by placeholders. To find out the placeholder names
  46. for your router, please refer to the manual of your device.
  47. Example: Fritz!Box Devices
  48. --------------------------
  49. For Fritz!Box devices, for example, the corresponding URL reads:
  50. ``https://update.dedyn.io/?myipv4=<ipaddr>&myipv6=<ip6addr>``
  51. ============================= =====
  52. Field Entry
  53. ============================= =====
  54. DynDNS Provider User-defined
  55. Update URL :superscript:`1` ``https://update.dedyn.io/?myipv4=<ipaddr>&myipv6=<ip6addr>``
  56. Domain Name <your domain>
  57. Username :superscript:`2` <your domain>
  58. Password :superscript:`3` <your authentication token secret>
  59. ============================= =====
  60. *Note 1*
  61. Note that the placeholders ``<ipaddr>`` and ``<ip6addr>`` in the update URL must
  62. remain unchanged; your router will substitute them automatically. Furthermore,
  63. it is neither necessary nor recommended to use the placeholders ``<username>``
  64. and ``<passwd>`` in the URL, as the Fritz!Box also supports HTTP basic
  65. authentication which is more secure (see :ref:`update-api-authentication`).
  66. *Note 2*
  67. **Not** your deSEC username! Instead, use the domain you want to update, for
  68. example ``yourdomain.dedyn.io``. See :ref:`update-api-authentication` for
  69. details.
  70. *Note 3*
  71. A valid token secret for the domain. **Not** your deSEC account password!
  72. Option 2: Use ddclient
  73. ``````````````````````
  74. Automatic configuration (Debian-/Ubuntu-based systems)
  75. ******************************************************
  76. If you're on Debian, Ubuntu or any other Linux distribution that provides you
  77. with the ddclient package, you can use it to update your IP address with our
  78. servers. Note that depending on the ddclient version you are using, IPv6
  79. support may be limited.
  80. To install ddclient, run ``sudo apt-get install ddclient``. If a configuration
  81. dialog does not appear automatically, use ``sudo dpkg-reconfigure ddclient`` to
  82. start the configuration process.
  83. In the configuration process, select "other" dynamic DNS service provider, and
  84. enter ``update.dedyn.io`` as the dynamic DNS server. Next, tell ddclient to use
  85. the "dyndns2" protocol to perform updates. Afterwards, enter the username and
  86. the token secret that you received during registration. Last, tell ddclient how to
  87. detect your IP address, your domain name and the update interval.
  88. **Note:** As of the time of this writing, ddclient does not use an encrypted
  89. HTTPS connection by default. To enable it, open ``/etc/ddclient.conf`` and add
  90. ``ssl=yes`` above the ``server=`` statement. We **strongly recommend** doing
  91. so; otherwise, your credentials will be exposed during transmission.
  92. Manual configuration (other systems)
  93. ************************************
  94. After installing ddclient, you can start with a ``ddclient.conf`` configuration
  95. file similar to this one, with the three placeholders replaced by your domain
  96. name and your token secret::
  97. protocol=dyndns2
  98. # Run in daemon mode: auto-update DNS every 10min. (Alternatively, use cron.)
  99. #daemon=600
  100. # "use=cmd" and the curl command is one way of doing this; other ways exist
  101. use=cmd, cmd='curl https://checkipv4.dedyn.io/'
  102. ssl=yes
  103. server=update.dedyn.io
  104. login=[domain]
  105. password='[token secret]'
  106. [domain]
  107. For more information, check out `these
  108. <https://sourceforge.net/p/ddclient/wiki/routers/>`_ two `sections
  109. <https://sourceforge.net/p/ddclient/wiki/usage/>`_ of the ddclient
  110. documentation.
  111. *Note 1*
  112. Exclusively on Debian and derivatives, since ddclient 3.8.2-3 you can enable
  113. IPv6 by replacing ``use`` with ``usev6``, ``checkipv4.dedyn.io`` with
  114. ``checkipv6.dedyn.io``, and ``update.dedyn.io`` with ``update6.dedyn.io``.
  115. There are some notes `here
  116. <https://github.com/ddclient/ddclient/blob/develop/docs/ipv6-design-doc.md>`_.
  117. *Note 2*
  118. According to :ref:`determine-ip-addresses`, the IP used for connecting to
  119. the update server is also considered when trying to find an IPv6 address to
  120. assign to your domain. So, if you connect via IPv6, this address will be
  121. set on your domain, *even if you did not provide it explicitly*.
  122. If you would like to *avoid* setting an IPv6 address automatically, and
  123. instead configure an address statically (or remove the address), you can add
  124. a the ``myipv6`` parameter on the domain section, like this:
  125. ``mydomain.dedyn.io&myipv6=`` (delete) or ``mydomain.dedyn.io&myipv6=::1``
  126. (static value)
  127. To test your setup, run ``sudo ddclient -force`` and see if everything works as
  128. expected.
  129. .. _updating-multiple-dyn-domains:
  130. Updating multiple domains
  131. `````````````````````````
  132. To update multiple domain or subdomains, it is best to designate one of them
  133. as the main domain, and create CNAME records for the others, so that they act
  134. as DNS aliases for the main domain.
  135. You can use do that either via the web interface or the API.
  136. If you try to update several subdomains directly (by issuing multiple update
  137. requests), your update requests may be refused (see :ref:`rate-limits`).