Free DynDns alternative with Mikrotik

A little know feature of every Mikrotik RouterOS device is the build in DNS feature which gives you a fully qualified domain based on your current public IP. This feature is especially interesting if you have a constantly changing IP.

One thing I noticed that can occur if your Mikrotik sits behind NAT is that the IP sometimes does not update. You can use the following script to trigger the update manually on scheduled time.

Open Winbox and go to – > System – Scheduler
Click onto the + icon to create a new schedule
Specify your desired interval time, for example very 5 minutes and paste the following code under “On Event”:

#get current external IP
:global currentIP [:resolve server=];
:global resolvedIP;

# Determine if DNS update is needed
:if ($currentIP != $resolvedIP) do={
:log info ("Mynetname update needed: Current-IP: $currentIP Resolved-IP: $resolvedIP")
/ip cloud force-update
:global resolvedIP [:resolve server=];
} else={
:log info ("Mynetname: No update needed ($currentIP=$resolvedIP)")

Follow us

Don't be shy, get in touch. We love meeting interesting people and making new friends.

Most discussed

Get your e-mail updates

Sign up and get your news fix directly to your inbox. Nothing more nothing else and definitely no spam.
Email address
We won't share your e-mail or send spam