I have a /64 ip, and I am unable to get Cloudflare ddns scripts to get it to work. I basically want it to have my ipv6_prefix_delegated::5 , where 5 is the fixed suffix.
How is this possible to achieve?
And what to set in lookup "hostname" and "domain" in luci-app-ddns?
Error in ddns log, redacted private info
141203 : Current IP '2776:7499:c3:0:1239:8877:9073:5fyh' detected on network 'wan6'
141205 : {"success":false,"errors":[{"code":6003,"message":"Invalid request headers","error_chain":[{"code":6103,"message":"Invalid format for X-Auth-Key header"}]}],"messages":[],"result":null}
141205 ERROR : IP update not accepted by DDNS Provider
You can probably use a custom script as your IP address source, this script should read ipv6-prefix.address from the interface and append the suffix you want.
Alternatively you could use another DDNS provider who has an option to update the prefix only.
I need some help with scripting. Will this script work? and where to place it?
#!/bin/sh
INTERFACE="br-lan"
SUFFIX="::5"
get_ipv6_prefix() {
ip -6 addr show dev "$INTERFACE" scope global | \
grep 'inet6' | awk '{print $2}' | cut -d'/' -f1 | cut -d':' -f1-4 | \
head -n 1
}
PREFIX=$(get_ipv6_prefix)
if [ -z "$PREFIX" ]; then
echo "ERROR: No global IPv6 prefix found on interface $INTERFACE."
exit 1
else
FULL_IPV6="${PREFIX}${SUFFIX}"
echo "$FULL_IPV6"
fi
I suggest using ifstatus instead of ip to get the prefix details:
ifstatus lan | jsonfilter -e '@["ipv6-prefix-assignment"][0].address'
The script should output an address or nothing. You can test it by manually running from the shell before referring to it in DDNS client configuration.
Yes, I need help trying to understand what this means.
I think instead of just 2406:7400:00c4:4ebf::99 its including all those 0's and Cloudflare is not accepting? I am not sure.
Actually, the IP with 0's are a lengthier version of the short form ip.