Dyndns ipv6 wont work

hi,

I set up dyndns (Ionos). Ip4 no A record created running.

Ip6, the client starts, but no AAAA record created, hence doesnt show registered ip6.

  1. problem I see is, WARN no valid ip found, and when I check with "cat ionos6.ip" blank line in return, in comparision.. cat ionos prompt current ip4 addr.
  2. WARN : Error in 'expand_ipv6()' - invalid IPv6 found: '' expanded: ''
  3. Current IP '2a02:' detected on interface 'pppoe-wan'
  4. Update needed - L: '2a02:' <> R: 'invalid' --> instead of 'invalid' there should be the ip6 addr starting 2a02:...
  5. finally at the end intersthing positive message, but no AAAA
 174630       : DDNS Provider answered:
 174630  info : Update successful - IP '2a02:' send
 174630  info : Forced update successful - IP: '2a02:' send
  1. constant error message I receive is
    181234 WARN : NO valid IP found
    181234 WARN : Get registered/public IP for 'dmz.dumpshock.icu' failed - retry 17/0 in 60 seconds

Anything that comes to my mind didn't worked. View days back I used a Fritzbox, where dyndns worked for both ip4 & ip6 perfectly fine.

This is my ddns config

config service 'ionos'
	option enabled '1'
	option lookup_host 'dmz.dumpshock.icu'
	option update_url 'https://ipv4.api.hosting.ionos.com/dns/v1/dyndns?_my_api.key_&ipv4=<ipaddr>'
	option use_ipv6 '0'

config service 'ionos6'
	option use_ipv6 '1'
	option enabled '1'
	option lookup_host 'dmz.dumpshock.icu'
	option update_url 'http://ipv4.api.hosting.ionos.com/dns/v1/dyndns?_my_api.key_&ip6=<ip6addr>'
	option domain 'dmz.dumpshock.icu'
	option use_https '1'
	option cacert 'IGNORE'
	option ip_source 'interface'
	option ip_interface 'pppoe-wan'
	option use_syslog '2'
	option check_unit 'minutes'
	option force_unit 'minutes'
	option retry_unit 'seconds'
	option username 'na'
	option password 'na'
	option interface 'pppoe-wan'
	option param_enc 'ip6addr'

ionos6 client protocol

174206  WARN : Get registered/public IP for 'dmz.dumpshock.icu' failed - retry 165/0 in 60 seconds
 174307       : #> /usr/bin/nslookup dmz.dumpshock.icu  >/var/run/ddns/ionos6.dat 2>/var/run/ddns/ionos6.err
 174307  WARN : NO valid IP found
 174307  WARN : Get registered/public IP for 'dmz.dumpshock.icu' failed - retry 166/0 in 60 seconds
 174407       : #> /usr/bin/nslookup dmz.dumpshock.icu  >/var/run/ddns/ionos6.dat 2>/var/run/ddns/ionos6.err
 174407  WARN : NO valid IP found
 174407  WARN : Get registered/public IP for 'dmz.dumpshock.icu' failed - retry 167/0 in 60 seconds
 174507       : #> /usr/bin/nslookup dmz.dumpshock.icu  >/var/run/ddns/ionos6.dat 2>/var/run/ddns/ionos6.err
 174507  WARN : NO valid IP found
 174507  WARN : Get registered/public IP for 'dmz.dumpshock.icu' failed - retry 168/0 in 60 seconds
 174607       : #> /usr/bin/nslookup dmz.dumpshock.icu  >/var/run/ddns/ionos6.dat 2>/var/run/ddns/ionos6.err
 174607  WARN : NO valid IP found
 174607  WARN : Get registered/public IP for 'dmz.dumpshock.icu' failed - retry 169/0 in 60 seconds
 174628       : ************ ************** ************** **************
 174628  note : PID '27630' started at 2024-09-30 17:46
 174628       : ddns version  : 2.8.2-43
 174628       : uci configuration:
ddns.ionos6.cacert='IGNORE'
ddns.ionos6.check_unit='minutes'
ddns.ionos6.domain='dmz.dumpshock.icu'
ddns.ionos6.e***PW***bled='1'
ddns.ionos6.force_unit='minutes'
ddns.ionos6.interface='pppoe-wan'
ddns.ionos6.ip_interface='pppoe-wan'
ddns.ionos6.ip_source='interface'
ddns.ionos6.lookup_host='dmz.dumpshock.icu'
ddns.ionos6.param_enc='ip6addr'
ddns.ionos6.password='***PW***'
ddns.ionos6.retry_unit='seconds'
ddns.ionos6.update_url='http://ipv4.api.hosting.ionos.com/dns/v1/dyndns?_my_apikey_&ip6=<ip6addr>'
ddns.ionos6.use_https='1'
ddns.ionos6.use_ipv6='1'
ddns.ionos6.use_syslog='2'
ddns.ionos6.user***PW***me='***PW***'
ddns.ionos6=service
 174628       : verbose mode  : 0 - run normal, NO console output
 174628       : check interval: 600 seconds
 174629       : force interval: 4320 seconds
 174629       : retry interval: 60 seconds
 174629       : retry max count : 0 times
 174629       : 'SIGTERM' was send to old process
 174629  note : PID '9219' termi***PW***ted by 'SIGTERM' at 2024-09-30 17:46
 174629       : last update: 2024-09-30 14:47
 174629       : Detect registered/public IP
 174629       : #> /usr/bin/nslookup dmz.dumpshock.icu  >/var/run/ddns/ionos6.dat 2>/var/run/ddns/ionos6.err
 174629  WARN : NO valid IP found
 174629  WARN : Error in 'expand_ipv6()' - invalid IPv6 found: '' expanded: ''
 174629  info : Starting main loop at 2024-09-30 17:46
 174629       : Detect current IP on 'interface'
 174629       : #> ip -o addr show dev pppoe-wan scope global >/var/run/ddns/ionos6.dat 2>/var/run/ddns/ionos6.err
 174629       : Current IP '2a02:' detected on interface 'pppoe-wan'
 174629       : Update needed - L: '2a02:' <> R: 'invalid'
 174629       : #> /usr/bin/curl -RsS -o /var/run/ddns/ionos6.dat --stderr /var/run/ddns/ionos6.err --insecure --noproxy '*' 'https://ipv4.api.hosting.ionos.com/dns/v1/dyndns?_my-apikey_&ip6=<ip6addr>'
 174630       : DDNS Provider answered:
 174630  info : Update successful - IP '2a02:' send
 174630  info : Forced update successful - IP: '2a02:' send
 174630       : Waiting 600 seconds (Check Interval)
 175630       : Detect registered/public IP
 175630       : #> /usr/bin/nslookup dmz.dumpshock.icu  >/var/run/ddns/ionos6.dat 2>/var/run/ddns/ionos6.err
 175630  WARN : NO valid IP found
 175630  WARN : Get registered/public IP for 'dmz.dumpshock.icu' failed - retry 1/0 in 60 seconds
 175730       : #> /usr/bin/nslookup dmz.dumpshock.icu  >/var/run/ddns/ionos6.dat 2>/var/run/ddns/ionos6.err
 175730  WARN : NO valid IP found
 175730  WARN : Get registered/public IP for 'dmz.dumpshock.icu' failed - retry 2/0 in 60 seconds
 175830       : #> /usr/bin/nslookup dmz.dumpshock.icu  >/var/run/ddns/ionos6.dat 2>/var/run/ddns/ionos6.err
 175831  WARN : NO valid IP found
 175831  WARN : Get registered/public IP for 'dmz.dumpshock.icu' failed - retry 3/0 in 60 seconds
 175931       : #> /usr/bin/nslookup dmz.dumpshock.icu  >/var/run/ddns/ionos6.dat 2>/var/run/ddns/ionos6.err
 175931  WARN : NO valid IP found
 175931  WARN : Get registered/public IP for 'dmz.dumpshock.icu' failed - retry 4/0 in 60 seconds
 180031       : #> /usr/bin/nslookup dmz.dumpshock.icu  >/var/run/ddns/ionos6.dat 2>/var/run/ddns/ionos6.err
 180031  WARN : NO valid IP found
 180031  WARN : Get registered/public IP for 'dmz.dumpshock.icu' failed - retry 5/0 in 60 seconds

Run curl with their custom URL manually from the console and show the result. You can use any dummy IP address or a reserved address like 2001:0DB8::1.

I run curl -X GET update_url&ipv6=2001:0DB8::1 output is

1]+  Done                       curl -X GET update_url w/o ip6...

I forgot to mention that I done this like Ionos described on there help pages. Also tried with both ip4 and ip6 and the end of the update url. like one a Fritzbox would do.

no AAAA dyndns entry

That is useless. You need to show both request and response, similar to what is shown on their help page:
curl -X GET https://ipv4.api.hosting.ionos.com/dns/v1/dyndns?blablabla

You do not need to hide anything except your API token.

here is the picture of my Terminal. there is not much else I can show

You don't need to make pictures, just copy and paste text.

Enough for me, you're on your own.

I provided all output I got...thanks anyway

Remove the lookup_host option. Lookup host is a third party host that will be consulted to report your source IP, instead of reading it internally from the kernel interface. Since you're incorrectly trying to use your own name as lookup_host, and no address is yet associated with that name, it fails to DNS the name and crashes at that point.

201315       : ************ ************** ************** **************
 201315  note : PID '26763' started at 2024-09-30 20:13
 201315       : ddns version  : 2.8.2-43
 201315       : uci configuration:
ddns.ionos6.cacert='IGNORE'
ddns.ionos6.check_unit='minutes'
ddns.ionos6.domain='dmz.dumpshock.icu'
ddns.ionos6.e***PW***bled='1'
ddns.ionos6.force_unit='minutes'
ddns.ionos6.interface='wan6'
ddns.ionos6.ip_network='wan6'
ddns.ionos6.ip_source='network'
ddns.ionos6.param_enc='<ip6addr>'
ddns.ionos6.password='***PW***'
ddns.ionos6.retry_unit='seconds'
ddns.ionos6.update_url='http://ipv4.api.hosting.ionos.com/dns/v1/dyndns?&myip=[IP]'
ddns.ionos6.use_https='1'
ddns.ionos6.use_ipv6='1'
ddns.ionos6.use_syslog='2'
ddns.ionos6.user***PW***me='***PW***'
ddns.ionos6=service
 201315       : verbose mode  : 0 - run normal, NO console output
 201315       : check interval: 600 seconds
 201315       : force interval: 4320 seconds
 201315       : retry interval: 60 seconds
 201315       : retry max count : 0 times
 201315       : 'SIGTERM' was send to old process
 201315  note : PID '25592' termi***PW***ted by 'SIGTERM' at 2024-09-30 20:13
 201316       : last update: 2024-09-30 20:08
 201316       : Detect registered/public IP
 201316       : #> /usr/bin/nslookup dmz.dumpshock.icu  >/var/run/ddns/ionos6.dat 2>/var/run/ddns/ionos6.err
 201316  WARN : NO valid IP found
 201316  WARN : Error in 'expand_ipv6()' - invalid IPv6 found: '' expanded: ''
 201316  info : Starting main loop at 2024-09-30 20:13
 201316       : Detect current IP on 'network'
 201316       : Current IP '2a02:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx' detected on network 'wan6'
 201316       : Update needed - L: '2a02:33' <> R: 'invalid'
 201316       : Force communication via device 'pppoe-wan'
 201316       : #> /usr/bin/curl -RsS -o /var/run/ddns/ionos6.dat --stderr /var/run/ddns/ionos6.err --interface pppoe-wan --insecure --noproxy '*' 'https://ipv4.api.hosting.ionos.com/dns/v1/dyndns?q=&myip=2a02:'
 201317       : DDNS Provider answered:
 201317  info : Update successful - IP '2a02:3' send
 201317  info : Forced update successful - IP: '2a02:' send
 201317       : Waiting 600 seconds (Check Interval)

here is the log. same output as before. for some reason it finds a no valid ip. For my understanding Im used lookup_host with the ip4 client and worked fine. Is ipv6 different?

Error in 'expand_ipv6()' - invalid IPv6 found: '' expanded: ''

this made me thinking, I just looked up what expanded mean, its a 128-bit address, and a 128-bit address is being fetched. What number is OpenWRT expecting (maybe ipv6-prefix)?

Sorry for typos, my fingers are so cold

next time just be precise if you want curl -v but wrote curl.

I assume that the "L" address is the same one as the current IP on the previous line and you redacted it. The entire 128 bit address is needed, as that uniquely identifies the one particular device. If the entire address was sent and you have Update Successful, your name should now have an AAAA record-- though it may take several minutes to become available on all the DNS servers.

It is normal for Remote to be invalid the first time since there was no DNS record for your name yet.

I totally agree with you, but the AAAA record has not been created.

Yesterday, I tested with a second openwrt router.

I created a ip6 client and,

  1. I only used the the update url without &ipv6= and surprisingly in return I received a ip4 address.
  2. this time with &ipv6= and same result, but the ip that was found was the private /128 ip address below
16: br-wan    inet6 fe80/64 scope link \       valid_lft forever preferred_lft forever
18: pppoe-wan    inet 78.51.235.181 peer 62.52.193.30/32 scope global pppoe-wan\       valid_lft forever preferred_lft forever
18: pppoe-wan    inet6 2a02:3100:5602:bdd6:6a:d570:32b3:377a/64 scope global dynamic noprefixroute \       valid_lft 259060sec preferred_lft 172660sec
18: pppoe-wan    inet6 fe80/128 scope link \       valid_lft forever preferred_lft forever

above the ip -o addr from yesterday...public ips are not valid anymore.

my conclusion is, its fetching the 128-bit private address and thats the invalid address. Because if it would fetch a correct ip6 address it would be stored in ionos6.ip, but ionos6.ip is empty, hence I need valid ipv6

But, second, I don't understand this part of the log:

174630       : DDNS Provider answered:
 174630  info : Update successful - IP '2a02:' send
 174630  info : Forced update successful - IP: '2a02:' send

If the provider respond update successfull, but no record AAAA, is perhaps the second problem to solve.

I tried to update manually like described by Ionos, below the output, but it doesnt tell me anything

root@LuciLu:~# curl -vX GET update_url_ipv4=xxx&ipv6=xxx
root@LuciLu:~# 
[2]+  Done                       curl -vX GET 
root@LuciLu:~# Note: Unnecessary use of -X or --request, GET is already inferred.
> GET /dns/v1/dyndns?
api.key HTTP/2
> Host: ipv4.api.hosting.ionos.com
> User-Agent: curl/8.7.1
> Accept: */*
> 
< HTTP/2 200 
< date: Tue, 01 Oct 2024 10:29:55 GMT
< content-length: 0
< set-cookie: DPX=v1:EbdD4+EYKC:X1F2tCbx:66fbdd38:de; Path=/; Expires=Tue, 01-Oct-24 11:29:55 GMT; HttpOnly; Secure; SameSite=Lax
< vary: Origin
< vary: Access-Control-Request-Method
< vary: Access-Control-Request-Headers
< cache-control: no-cache, no-store, max-age=0, must-revalidate
< pragma: no-cache
< expires: 0
< x-content-type-options: nosniff
< x-frame-options: DENY
< x-xss-protection: 1 ; mode=block
< referrer-policy: no-referrer
< x-b3-traceid: 99ec29c13e95f3ea
< x-kong-upstream-latency: 396
< x-kong-proxy-latency: 1
< via: kong/3.0.0
< set-cookie: 0b04270753322c986927738ac2b6c0d8=261e7e76dda402a1c6982d436f65f7e5; path=/; HttpOnly; Secure; SameSite=None
< vary: Origin
< access-control-allow-origin: *
< 

[1]+  Done                       curl -vX GET https://ipv4.api.hosting.ionos.com/dns/v1/dyndns?q=api.key
root@LuciLu:~# 

here with same but with update_url only

Host: ipv4.api.hosting.ionos.com
> User-Agent: curl/8.7.1
> Accept: */*
> 
< HTTP/2 200 
< date: Tue, 01 Oct 2024 10:38:01 GMT
< content-length: 0
< set-cookie: DPX=v1:ncuLXXY6nM:60iVj77P:66fbdf1d:de; Path=/; Expires=Tue, 01-Oct-24 11:38:00 GMT; HttpOnly; Secure; SameSite=Lax
< vary: Origin
< vary: Access-Control-Request-Method
< vary: Access-Control-Request-Headers
< cache-control: no-cache, no-store, max-age=0, must-revalidate
< pragma: no-cache
< expires: 0
< x-content-type-options: nosniff
< x-frame-options: DENY
< x-xss-protection: 1 ; mode=block
< referrer-policy: no-referrer
< x-b3-traceid: adb6585866295943
< x-kong-upstream-latency: 635
< x-kong-proxy-latency: 1
< via: kong/3.0.0
< set-cookie: 0b04270753322c986927738ac2b6c0d8=261e7e76dda402a1c6982d436f65f7e5; path=/; HttpOnly; Secure; SameSite=None
< vary: Origin
< access-control-allow-origin: *

if it is sending literally only 2a02: and I'm not seeing that because it is something that you redacted, that is a problem with the script. It needs to send the whole 128 bit address.

An IPv6 that starts with 2 is a public or GUA address which can be reached from the Internet and can be registered in DNS.

Running curl manually you should use -O to send anything the site returns to a file, and then examine that file.

I wonder if submitting requests to ipv4.api.... limits to ipv4 support. There is also just api.ikonos which is dual stack, and you can certainly reach it with v6 from your router.

below are my yesterdays IP, ip6-prefix /56 and a 64 bit public ip6 addr for wan. Ive never seen a different looking ip6. I understood that clients in network will receive a 128 bit ip6 address as the first 64 are public...I maybe wrong just started to learn a bit more ip6 essentials.

I will do curl -O in a bit and return back.

About the ipv4.api. Below is an examble how the update url with api.token looks like. Its from Ionos support website.
With Fritzbox you just use the update_url with optional parameter at the end (&ipv4=&ipv6=)

[type or paste code here]
https://ipv4.api.hosting.ionos.com/dns/v1/dyndns?q=NDFjZmM3YmVjYjQzNDRhMTkxMzliZDAwYzA2OGU3NzEuU2FvNlhuR2U4UmtxNGdiQzlMN19TLWpZanM4LWZBdGsxX2Ixa2FFUmRFWUp4Z1pmR3NWOVFpUjZYZGQ5TTZ5QjBIZkxSRFAyN2lzeHhCRWNuNVpSU0E&ipv4=<ipaddr>&ipv6=<ip6addr>

Thanks for the tip with the api.ionos, its not mention by Ionos anywhere. And when one create the update url it return api4 one.
I'll give it a try of course

ok...what I did:

  1. switched to Fritzbox dyndns records A and AAAA has been created (goal was to trick openwrt to get rid of invalid ip)
  2. back to Openwrt the remorte IPs has been pulled, no invalid IP anymore, but ipv4 only got updated in Openwrt and the A record. The IP6 log looks good now I guess, because update IP6 adress has been sent but like I said now update.
  3. used api.ionos....doesnt work either

After doing a bit more research other ppl running into the same problem, this confirmed my theory I had already yesterday, IP6 will be updated only together with the IP4 request.

Not sure how this can work in Openwrt if ddns-update-script can handly only one IP protocol sametime, perhaps with ddns config?