Mikrotik Dynamic DNS Setup

Just a quick post today to show you how to setup the equivalent of Dynamic DNS on your Mikrotik router. I'm doing this tutorial using RouterBOARD 750G r3, but this will work on virtually any Mikrotik device that utilises RouterOS.

So why is this needed? This is a really cool solution when you have a dynamic Public IP for your internet connection as opposed to a static Public IP. When you have a Dynamic IP, it makes it difficult for you to know the new IP of your device received after a disconnect from the internet. This solves that problem, but automatically updating the new IP to a service that Mikrotik kindly provides.

You now don't have to pay for any third party solutions to update the IP address because Mikrotik does this out the box. For this exercise you're going to need the following:

  • Winbox to connect to your Mikrotik device. You can download that here...
  • Access to your own domain DNS settings if you want to create a CNAME (Not essential)

Let's get started...

Open Winbox and connect to your Mikrotik router using the username and password for your device. You should see something similar as the following:

Now click on IP and select Cloud as outlined in the following screenshot:

Now we're going turn the DDNS service on and set it to use your local public UP address. Following the screenshot below:

The initial setup is now complete.

You now need to take note of the DNS Name from the screenshot above. The DNS name will be the serial number of your Mikrotik device followed by sn.mynetname.net, for example 00ffccdd7755.sn.mynetname.net. Obviously this isn't easy to remember, so to fix that we can create a CNAME for your own domain to reflect the Mikrotik service above.

For example, if I were to create a CNAME for a sub domain called office.matrix7.com.au, I would point it to 00ffccdd7755.sn.mynetname.net so now it's easy for me to remember when I need to connect remotely to the routers VPN.

Every time the internet on your router goes down, the DDNS service will update the newly acquired Public IP making it easy for you to connect. As outlined in the Mikrotik Wiki here... your router will execute the following:

DDNS or Dynamic DNS is a service that updates the IPv4 address for A records and the IPv6 address for AAAA records periodically. Such a service is very useful when your ISP has provided a dynamic IP address that changes periodically, but you always need an address that you can use to connect to your device remotely. Below you can find operation details that are relevant to the IP/Cloud's DDNS service:

  • Checks for outgoing IP address change: every 60 seconds
  • Waits for the MikroTik's Cloud server's response: 15 seconds
  • DDNS record TTL: 60 seconds
  • Sends encrypted packets to cloud.mikrotik.com or cloud2.mikrotik.com using UDP/15252 port

If you've found this useful, you may want to sign up to our newsletter where you'll receive notices on when we post new articles and helpful "how tos". Just fill out your details below and we'll do the rest…

No Comments Yet.

Leave a comment


Sign up to our newsletter where you’ll receive notices on when we post new articles and helpful “how tos” to make your IT life easier.