Oh, in that case you need a simple script on the router that uses /tool fetch and dynv6.com Update API
https://dynv6.com/docs/apis#update to automatically update the DNS entry whenever the DHCPv6 Client gets a new prefix. You can try something like this (I've adapted from my script with another DDNS provider, not dynv6.com, so I've not tested it):
* Create a script, let's call it
update_dynv6 (vlan10 is the interface that has the IPv6 address that your router normally uses to go to the internet. Also remove
check-certificate=yes if you don't have the full CA roots installed):
:local token "xxxxxxxx";
:local host "my.domain.com";
:local ipv6Interface "vlan10";
:local PREFIX2IP6 do={
:return [:toip6 [:pick $1 0 [:find $1 "/" 0]]];
}
:if ([/interface get $ipv6Interface value-name=running]) do={
:local i6Addresses [/ipv6 address find global !dynamic interface=$ipv6Interface];
:if (1 > [:len $i6Addresses]) do={
:log error "Dynv6-Updater: Found $[:len $i6Addresses] global IPv6 addresses for interface \"$ipv6Interface\".";
} else={
:if (1 != [:len $i6Addresses]) do={
:log warning "Dynv6-Updater: Found $[:len $i6Addresses] global IPv6 addresses for interface \"$ipv6Interface\".";
}
:local currentIPv6 [$PREFIX2IP6 [/ipv6 address get number=($i6Addresses->0) address]];
:local url ("https://dynv6.com/api/update?zone=" . $host . "&token=" . $token . "&ipv4=-&ipv6=" . $currentIPv6);
:local resolvedIPv6 "";
do {
:set resolvedIPv6 [:resolve $host type=ipv6];
} on-error={
:log warning "Dynv6-Updater: No existing IPv6 record for $host";
}
:if ($currentIPv6 = $resolvedIPv6) do={
:log info "Dynv6-Updater: Host $host already on Dynv6.com with IP $currentIPv6";
} else={
:log info "Dynv6-Updater: Sending update for $host - $currentIPv6";
/tool fetch url=$url mode=https check-certificate=yes output=none;
:log warning "Dynv6-Updater: Host $host updated on Dynv6.com with IP $currentIPv6";
}
}
} else={
:log info "Dynv6-Updater: $ipv6Interface is not currently running.";
}
* Call the script from the "Script" section on the "Advanced" tab of the DHCPv6 Client entry:
if (1=$"pd-valid") do={
/delay 2
/system script run update_dynv6;
}
dhcpv6-client-script-2.png
You do not have the required permissions to view the files attached to this post.