Hi,
i’ve used this script to update my ddns:
:global ddnsuser "xxxx"
:global ddnspass "xxxxx"
:global theinterface "pppoe-telekom-fiber"
:global ddnshost1 "xxxx"
:global ipddns
:global ipfresh [/ip address get [find where interface=$theinterface] value-name=address]
:if ([ :typeof $ipfresh ] = nil ) do={
:log info ("DynDNS: No ip address on $theinterface .")
} else={
:for i from=( [:len $ipfresh] - 1) to=0 do={
:if ( [:pick $ipfresh $i] = "/") do={
:set ipfresh [:pick $ipfresh 0 $i];
}
}
:if ($ipddns != $ipfresh) do={
:log info ("DynDNS: IP-DynDNS = $ipddns")
:log info ("DynDNS: IP-Fresh = $ipfresh")
:log info "DynDNS: Update IP needed, Sending UPDATE...!"
:global str1 "/nic/update\?hostname=$ddnshost1&myip=$ipfresh"
/tool fetch address=dyndns.strato.com src-path=$str1 user=$ddnsuser password=$ddnspass mode=https dst-path=("/DynDNS.".$ddnshost1)
:delay 1
:global str1 [/file find name="DynDNS.$ddnshost1"];
/file remove $str1
:global ipddns $ipfresh
:log info "DynDNS: IP updated to $ipfresh!"
} else={
:log info "DynDNS: dont need changes";
}
}
Since the grid failure today, i’m getting the following error:
Download from 81.169.144.192 FAILED: Fetch failed with status 301 (Location: "https://www.strato.de/nic/update?hostname=xxxx.de&myip=xxxxxx")
I’ve checked the informations from my service provider, but they seems to be ok:
https://www.strato.de/faq/hosting/so-einfach-richten-sie-dyndns-fuer-ihre-domains-ein/
I have no idea, where to search for a solution…
Larsa
May 14, 2025, 4:45pm
3
On the script the url is right, why on log the url is not the same?..
same problem here …
… changed
/tool fetch address=dyndns.strato.com src-path=$str1 ...
to
/tool fetch url="https://dyndns.strato.com$str1" ...
works for me
dg3feh
May 15, 2025, 10:44am
7
Hello!
I face the same problme since today. I did not understand how it was fixed?
BR Holger
just simply use url=“…” with right parameters without all other useless frills.
My scrpt worked fine until yesterday, so something must have changed…
motdul
June 2, 2025, 10:20am
11
Thank you guys for the quick solution to the script. Does anybody know if this error in the script came from a change by Stratos or the latest Mikrotik ROS Update 7.19 / 7.19.1 ?
JSgn
June 17, 2025, 11:08am
12
I had the same issue, and did some diagnostics.
Strato seems to have done some work (whatever that might have been…) to their DynDNS Server.
What I found out:
The address parameter of the fetch command will send an HTTP GET, where the Host-Header is populated with the resolved IP-Address of, in this case, Strato.
The Strato Server doesn’t seem to like this anymore, responding with 301 moved permanently…
I fixed it, using the host parameter of the fetch tool:
/tool fetch address=dyndns.strato.com host=dyndns.strato.com ...
This causes the Host-Header to contain the unresolved URI (dyndns.strato.com ), which Strato accepts perfectly fine…
So yeah, definitely a change on Stratos side
Hi,
i thought i solved the issue, but after a grid failure again today, it won’t work.
Anyone see my mistake?
:global ddnsuser "xxxx"
:global ddnspass "xxxx"
:global theinterface "pppoe-telekom-fiber"
:global ddnshost1 "xxxx"
:global ipddns
:global ipfresh [/ip address get [find where interface=$theinterface] value-name=address]
:if ([ :typeof $ipfresh ] = nil ) do={
:log info ("DynDNS: No ip address on $theinterface .")
} else={
:for i from=( [:len $ipfresh] - 1) to=0 do={
:if ( [:pick $ipfresh $i] = "/") do={
:set ipfresh [:pick $ipfresh 0 $i];
}
}
:if ($ipddns != $ipfresh) do={
:log info ("DynDNS: IP-DynDNS = $ipddns")
:log info ("DynDNS: IP-Fresh = $ipfresh")
:log info "DynDNS: Update IP needed, Sending UPDATE...!"
/tool fetch url=("https://dyndns.strato.com/nic/update?hostname=$ddnshost1&myip=$ipfresh") \
user=$ddnsuser password=$ddnspass mode=https dst-path=("/DynDNS.".$ddnshost1)
:delay 1
:global str1 [/file find name="DynDNS.$ddnshost1"];
/file remove $str1
:global ipddns $ipfresh
:log info "DynDNS: IP updated to $ipfresh!"
} else={
:log info "DynDNS: dont need changes";
}
}