Working IPv6 ddclient.conf

Hello,
I successfully managed my nextbox to be reachable over my custom domain. I used the following ddclient.conf:

ipv4

daemon=600
cache=/tmp/ddclient.cache
pid=/var/run/ddclient.pid
use=web, web=checkip.dyndns.com/, web-skip=‘IP Address’

protocol=dyndns2
server=ddns.do.de
login=‘…’
password=‘…’
my.domain

Now I want to operate the nextbox behind a router where I only have IPv6. Bat I did not get it to work. The problem is to gather the right IPv6-Address. I managed to get the local IPv6 address so I could reach the nextbox from within the LAN. I used the following ddclient.conf:

ipv6

daemon=600
usev6=if, if=eth0

protocol=dyndns2
server=ddns.do.de
login=‘…’
password=‘…’
my.domain

Obviously the problem is that I gather the address from eth0 where I only get the local IPv6 address. But every other method just failed.

So to make a long story short: Can somebody maybe provide a ddclient.conf which works with ipv6? Thank you in advance!

One of the reasons we droppen ddclient for the guided DNS configuration is the fact that ddclient has IPv6 support, but it’s not really great, mainly providing IPv4 and IPv6 seems not to be possible.

But as long as you would like to use only IPv6 the following line should be added in your IPv6 configuration to enable ddclient to get the correct IPv6 address for your internet connection:

use=cmd, cmd='curl -k -s http://checkip6.spdyn.de'

this essentially calls cmd to determine your ipv6, you can easily try this out in any console. On top make sure you have dns-rebind adapted (and IPv6 mode inside your router) as explained in the docs: Managing Remote Access — Nitrokey Documentation

Thank you very much!
Unfortunately I get the same annoying message I often get when I try to use ddclient:

DEBUG: get_ip: using cmd, curl -k -s http://checkip6.spdyn.de reports <undefined>
WARNING: unable to determine IP address
DEBUG: sleep 600

But typing
$ curl -k -s http://checkip6.spdyn.de
in the console gives back the ipv6 address.

I feel the struggle :frowning:
Had the same pain to go through to make things work, fought a lot with the configuration details, my hints from here would be:

  • compare with other ddclient configs, like: DDNS-Clients › Wiki › ubuntuusers.de
  • check the config file syntax, admittedly I’ve never fully understood it, no idea how this was considered good at some point :wink:
  • make yourself a good test env, e.g., on the nextbox use ddclient --force to easily test your config
  • check Usage - ddclient docs, you can also pass all stuff via commandline to test, once this works you can try to “translate” this to ddclient…

finally, you might want to try the “guided dns configuration” instead it is by far simpler and automatically should update ipv6 and ipv4…

Thank you very much for the great support :smiley:! I ended up using the nextbox at another internet connection with a different ISP where I can use an IPv4 setup :sweat_smile:.

1 Like

Hello,

for anyone else out there with the same problem who finds this:

I think the problem might be the order of lines in ddclient.conf. I had the line

use=cmd, cmd=‘something.sh’

in there but it did not work, then from a logfile I noticed that something.sh was never called. I moved this line from the end of ddclient.conf up to the beginning of ddclient.conf, and now suddenly everything works nicely with IPv6.

Best, Piet