dynr. Guides
Log in Get started
← All guides

MikroTik

Logged in, the setup assistant fills in your own host name and token.

RouterOS has no built-in client for other DynDNS services, so a small script calls dynr.net every five minutes. If the address did not change, dynr.net simply answers nochg.

Paste this into the terminal (New Terminal in WinBox or WebFig), RouterOS v7:

/system script add name=dynr policy=read,write,test source={
  :local host "<your-host>.dynr.net"
  :local token "<your-token>"
  :local result [/tool fetch url=("https://dynr.net/nic/update\?hostname=" . $host) user=$host password=$token output=user as-value]
  :log info ("dynr: " . ($result->"data"))
}
/system scheduler add name=dynr interval=5m start-time=startup on-event="/system script run dynr"
/system script run dynr

dynr.net uses the address the request comes from. That is right as long as the MikroTik has the public address itself (no other router or CGNAT in front of it).

Check

Log shows dynr: good … or dynr: nochg ….

Problems

  • badauth: host name or token in the script is wrong.
  • failure: closing connection: the router cannot reach dynr.net over HTTPS; check DNS and the clock (System → Clock).