Can get ddclient on RPi to work

Hello everyone,

I tried to set up ddclient on my raspberry pi but get the following out but after force ddclient:

WARNING:  file /var/cache/ddclient/ddclient.cache, line 3: Invalid Value for keyword 'ip' = ''
WARNING:  cannot connect to update6.dedyn.io:80 socket: IO::Socket::INET: Bad hostname 'update6.dedyn.io'
FAILED:   updating xxxxx.dedyn.io: Could not connect to update6.dedyn.io.

ddclient.conf:

protocol=dyndns2
usev6=if, if=eth0
server=update6.dedyn.io
login=xxxxx.dedyn.io
password=Xxxx
xxxx.dedyn.io

Hope someone can help me with this.

Thank you.

Hi dnl0319!

Disclaimer: I have only minimal knowledge about ddclient and I don’t have a RPi or currently any Ubuntu systems running.

My guess, based on your error messages, would be a DNS problem. Also possibly a problem connecting to the Internet.

Things you can try:

$ dig update6.dedyn.io aaaa

$ ping desec.io
$ ping6 desec.io

$ curl --url 'https://checkipv4.dedyn.io'
$ curl --url 'https://checkipv6.dedyn.io'
(Requires curl(8), which may or may not be present on your RPi.)

$ ifconfig eth0
Assuming that eth0 is indeed the interface connected (indirectly) to the Internet.

HTH
fiwswe

Hi dnl0319,

in line two of the log that you posted, it says Bad hostname 'update6.dedyn.io'. Does hostname resolution work properly on that machine? You could try, e.g., host update6.dedyn.io to see if this machine can obtain the IP address of our servers.

Best,
Nils

Hello Nils,

I get the following feedback:

update6.dedyn.io has IPv6 address 2a01:4f8:10a:1044:deec:642:ac10:80

I think it look okay for me.

Does ddclient actually support an IPv6 address for the update server?

If it only tries to resolve the IPv4 address for update6.dedyn.io it will fail because this host is IPv6-only.

HTH
fiwswe

I assume that ddclient will work with ipv6 because of the tutorial from desec: Configuring your dynDNS Client — deSEC DNS API documentation

Yes, looks that way.

Does $ ping6 update6.dedyn.io work?

Does $ ifconfig eth0 show a public IPv6 address?

fiwswe

Yes, I get a ping and get an public IP address.

Ok, so the basic network setup seems to be ok.

Still the first error message indicates a missing value for ip.

Like I said, I don’t have ddclient experience. I tried to understand https://github.com/ddclient/ddclient/blob/develop/docs/ipv6-design-doc.md but it seems very awkward (both the document and the IPv6 support added to ddclient).

From my point of view there are two separate issues relating to IPv6:

  • Contacting the update server (update6.dedyn.io) using IPv6.
  • Determine the IPv6 IP to send to the update server.

I can’t tell for sure which of these is failing? Although the second error Bad hostname 'update6.dedyn.io' seems to indicate that ddclient is probably trying to contact the server using IPv4? But of course it can’t resolve the hostname to an IPv4 address because there is none.

Maybe you can make sense of the ipv6-design-doc.md mentioned above?

fiwswe

One more thing: you might want to try this setting in your ddclient.conf:
ssl = true (or is it ssl=yes?)

fiwswe

I tried ssl=yes with the following result:

pi@PiVPN-Hole:~ $ sudo ddclient -force
WARNING:  file /var/cache/ddclient/ddclient.cache, line 3: Invalid Value for keyword 'ip' = ''
SUCCESS:  updating xxxx.dedyn.io: good: IP address set to xx00:xxxx:43aa:0:xxxxx:ad1b:xxxx:xxb1

What does the warning mean?

Probably that ddclient could not resolve an IPv4 address for update6.dedyn.io?

Anyway, the important part is the SUCCESS message. Congratulation!

Did you verify using e.g. $ dig +short xxxx.dedyn.io AAAA?

fiwswe

What do you mean by verify it?

I would not rely on the SUCCESS status alone. That is only your software claiming everything worked (which is a good first indication). I’d check whether the DNS record can actually be resolved correctly. Like I wrote:
dig +short xxxx.dedyn.io AAAA
… and compare the result to your actual IPv6 address.

If that all looks good, then I’d accept this solution as fully functional.

fiwswe

Remember it will take a couple of seconds before your change will be visible at our nameservers and it will take up to a minute before the change will be visible at your local resolver. To avoid these problems, I suggest using

sleep 10
dig @ns2.desec.org +short xxxx.dedyn.io AAAA

Okay, I’ve received an ipv6 adress, but it is the ip of the pi itself. Not my public ip adress, which I can see on wieistmeineip.de

What does that mean?

Well of course. You used the local interface on your RPi to get your IP so that is what the DNS server is updated to:

If you need the public IPv6 of the router/gateway then you need to query that device. I don’t think there is any other way to get that IPv6 address.

The following is based on the assumption that your RPi is on a local network behind a router/gateway which is allocated dynamic IPs from your provider (which is probably why you want to use DDNS in the first place):

Note that IPv4 and IPv6 behave very differently w.r.t. dynamically allocated public IPs on routers/gateways.

  • Your local IPv4 address is usually behind a NAT so that the public IPv4 address of the router/gateway will be visible to external services (such as https://checkipv4.dedyn.io).
  • With IPv6 those services generally see the IP of your device, not that of your router/gateway (see https://checkipv6.dedyn.io). Most/many providers dynamically allocate a /64 IPv6 address to your router/gateway in addition to a network, often a /56 range, of publicly routed IPv6 addresses. Your devices then use individual /64 addresses from this range on the local network. The public IPv6 address of your device is likely not from the same network range (but its local IPv6 address will be).

That said, what is the problem with the DDNS IPv6 address being that of your RPi?

HTH
fiwswe