Ddns IPv6: ERROR : No or private or invalid IP

I configured DDNS for my router setup where internet connection is established via external DSL modem via PPPoE.
Such that I end up with a DSL, DSL_6, and a DSL_6_4 interface.

My br-lan interface obtains two Ipv6 addresses producing the error:

ERROR : No or private or invalid IP 'fe80:0000:0000:0000::xx' given! Please check
your configuration

How can I tell DDNS to use the global adress and not the link-local?

You need to register the wan address not the lan one. Point the DDNS script at DSL_6, it should have a GUA address (IP starts with 2 or 3, not F).

Okay. With DSL_6 I get this error:

162621 WARN : NO valid IP found
162621 WARN : Error in 'expand_ipv6()' - invalid IPv6 found: '' expanded: ''
162621 info : Starting main loop at 2024-07-10 16:26
162621 : Detect current IP on 'network'
162621 ERROR : Can not detect current IP using network_get_ipaddr6 'DSL_6' - Error: '1' - TERMINATE

ubus call network.interface dump | grep interface

"interface": [
"interface": "DSL",
"interface": "DSL_6",
"interface": "DSL_6_4",
"interface": "MODEM_WAN", << static adress for accessing modem
"interface": "lan",
"interface": "loopback",
"interface": "vpn",

Then please

ifstatus DSL_6
ifstatus lan

Here is the output:

{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": true,
        "uptime": 69248,
        "l3_device": "pppoe-DSL",
        "proto": "dhcpv6",
        "device": "pppoe-DSL",
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [
        ],
        "ipv6-address": [
        ],
        "ipv6-prefix": [
                {
                        "address": "2xxx::",
                        "mask": 56,
                        "preferred": 2838,
                        "valid": 6438,
                        "class": "DSL_6",
                        "assigned": {
                                "lan": {
                                        "address": "2xxx::",
                                        "mask": 64
                                }
                        }
                }
        ],
        "ipv6-prefix-assignment": [
        ],
        "route": [
                {
                        "target": "::",
                        "mask": 0,
                        "nexthop": "fxxx",
                        "metric": 512,
                        "valid": 3889,
                        "source": "2xxx::/56"
                }
        ],
        "dns-server": [
                "2xxxx::53",
                "2xxxx::153"
        ],
        "dns-search": [
        ],
        "neighbors": [
        ],
        "inactive": {
                "ipv4-address": [
                ],
                "ipv6-address": [
                ],
                "route": [
                ],
                "dns-server": [
                ],
                "dns-search": [
                ],
               "neighbors": [
                ]
        },
        "data": {
                "zone": "wan",
                "passthru": "xxxxxxxxx",
                "zone": "wan"
        }
}
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 69449,
        "l3_device": "br-lan",
        "proto": "static",
        "device": "br-lan",
        "updated": [
                "addresses"
        ],
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [
                {
                        "address": "192.168.2.1",
                        "mask": 24
                }
        ],
        "ipv6-address": [
        ],
        "ipv6-prefix": [
        ],
        "ipv6-prefix-assignment": [
                {
                        "address": "2xxxx::",
                        "mask": 64,
                        "preferred": 2657,
                        "valid": 6257,
                        "local-address": {
                                "address": "2xxxxxx",
                                "mask": 64
                        }
                }
        ],
        "route": [
        ],
        "dns-server": [
        ],
        "dns-search": [
        ],
        "neighbors": [
        ],
        "inactive": {
                "ipv4-address": [
                ],
                "ipv6-address": [
                ],
                "route": [
                ],
                "dns-server": [
                ],
                "dns-search": [
                ],
                "neighbors": [
                ]
        },
        "data": {
        }
}

DSL_6 received the prefix, maybe the router's address is directly on DSL?
Run ip -6 addr show will show the interfaces and any IPv6 addresses they hold.

The only interface that holds an IPv6 address starting with 2x is bound to the br-lan interface.
What do you mean by

maybe the router's address is directly on DSL?

means check ifstatus DSL for any IPv6 addresses

Then you will probably need to use that interface in DDNS config.

Ok. DSL only has a link-local address.

In that case I'm back to square one.

The function used to find the address - network_get_ipaddr6 - takes the 1st IPv6 address of given logical interface. You can see it in /lib/functions/network.sh
First it will look for ipv6-address - it is empty in your case (see ifstatus lan output above).
Then it will check ['ipv6-prefix-assignment'][0]['local-address'].address - and here you have your address as we can see from the same output:

Show your DDNS config.

1 Like

cat /etc/config/ddns

Okay, this is odd. This time, changing back to interface br-lan, finding the ip address succeeds.

ddns.myddns_ipv6.interface='br-lan'
ddns.myddns_ipv6.ip_interface='br-lan'
ddns.myddns_ipv6.ip_source='interface'

Thank you very much for your assistance!