APIs

HTTP

Update API

Whenever your IP address changes, send an HTTP GET request to the following URI:

https://dynv6.com/api/update

You can use http:// instead of https:// (although not recommended).

Parameters

Name Description
zone (mandatory) Your dynv6 zone name.

Alternative parameter names: hostname and Hostname

token (mandatory) An HTTP token for this zone.
ipv4 (optional) One of the following values:
  • Your IPv4 address in dotted decimal format (e.g. 123.123.123.123)
  • auto to use the clients address
If empty or unset, the current IPv4 address is kept unchanged.
ipv6 (optional) One of the following values:
  • Your IPv6 network in CIDR notation (e.g. 2a02:12ab:34c:ef::/56),
  • auto to guess the prefix from your client address
  • 6to4 to generate a 6to4 prefix from your IPv4 address
If empty or unset, the current IPv6 address is kept unchanged.

Note on auto values

If you set ipv4=auto or ipv6=auto/6to4, you might want to use a different URL to enforce a specific IP protocol version:

  • for IPv4-only
    https://ipv4.dynv6.com/api/update?ipv4=auto&token=...
  • for IPv6-only
    https://ipv6.dynv6.com/api/update?ipv6=auto&token=...
    https://ipv6.dynv6.com/api/update?ipv6=6to4&token=...

Use our update script

We provide a small script that updates your address at dynv6. You can run it with:

token=your-token ./dynv6.sh example.dynv6.net

SSH

Upload your SSH key on the keys page and connect to api@dynv6.com.

To execute commands you can use our interactive shell (pseudo-terminal) or run commands directly. Use TAB to learn the command structure.

Features implemented

  • Listing and adding hostnames
  • Listing records
  • Updating the IPv4/IPv6 address of a dynv6 hostname
  • Adding and updating A/AAAA/TXT records

Features coming next

  • Adding and updating CNAME/MX records
  • Removing records

DNS Update

Prerequisites

First, you need to generate a TSIG key.

Then you need a client application to update DNS enties, like nsupdate (or nsupdate.exe on Windows). It is part of the ISC BIND distribution and generally available for most operating systems.

Note: You can use any RFC2136 compliant software to manage your DNS entries, nsupdate is just one example. Another viable option, especially if you only want to obtain free Let's Encrypt certificates, is to use lego (and software based on lego, like Caddy)

Example

If you've meet all prerequisites, you can for example, update the A and AAAA records for yourhost.dynv6.com like so:

nsupdate <<EOF
  server ns1.dynv6.com
  zone yourhost.dynv6.com
  update delete yourhost.dynv6.com A
  update add yourhost.dynv6.com 60 A 127.0.0.1
  update delete yourhost.dynv6.com AAAA
  update add yourhost.dynv6.com 60 AAAA ::1
  key hmac-sha256:_123._tsig.dynv6.com YourSHAREDsecret==
  send
EOF

This alters your host yourhost.dynv6.com using the TSIG key named _123._tsig.dynv6.com.


Notes:

  1. The actual update set are the lines 2-9 (between <<EOF and EOF).

  2. The server command (l. 2) is optional for recent versions of nsupdate. Very old versions might need an IP address, in that case use server 185.55.116.154.

  3. We require the zone command (l. 3) for authorization. Your updates will be rejected, if the zone does not match the provided key (l. 8).

  4. Before adding new entries (update add, ll. 5/7), you should cleanup existing records (update delete, ll. 6/8), unless you really want to end up with multiple records.

  5. The TSIG key must be used in the form algo:name secret (l. 8). It must be the last entry in an update set.

  6. With nsupdate, do not use empty/blank lines to separate statements: these are interpreted as send command, and your update will likely fail. You can use ; at the beginning of a line, though (a semicolon indicates a comment and will be ignored).