Hi.
I adaptated the orginal script IPv4 to working with IPv6, because sometimes the prefix received is changed, then nothing like a script for update the AAAA on Free DNS service of HE.
Original Script IPv4: http://wiki.mikrotik.com/wiki/Dynamic_DNS_Update_Script_for_Hurricane_Electric_DNS
This script now uses HTTPS to comunicate with HE Update service, also get the IPv6 Global of interface selected and not the link-local.
# Update Hurricane Electric DDNS IPv6 address
:local ddnshost "<ddns_name>"
:local key "key"
:local updatehost "dyn.dns.he.net"
:local WANinterface "<if>"
:local outputfile ("HE_DDNS" . ".txt")
# Internal processing below...
# ----------------------------------
:local ipv6addr
# Get WAN interface IP address
:set ipv6addr [/ipv6 address get [/ipv6 address find interface=$WANinterface global] address]
:set ipv6addr [:pick [:tostr $ipv6addr] 0 [:find [:tostr $ipv6addr] "/"]]
:if ([:len $ipv6addr] = 0) do={
:log error ("Could not get IP for interface " . $WANinterface)
:error ("Could not get IP for interface " . $WANinterface)
}
:log info ("Updating DDNS IPv6 address" . " Client IPv6 address to new IP " . $ipv6addr . "...")
/tool fetch mode=https url="https://$ddnshost:$key@$updatehost/nic/update?hostname=$ddnshost&myip=$ipv6addr" \
dst-path=$outputfile
:log info ([/file get ($outputfile) contents])
/file remove ($outputfile)
Can someone add this script to wiki?
Thanks.