Dynamic Public IPv4 Solution using IP Cloud

In this article we will explain about how MikroTik have provided a free DDNS (Dynamic DNS) Service using their “IP Cloud” feature to get around the problem of accessing routers that do not have a fixed Public IP.

Many ISPs do not provide a static Public IPv4 with their lowest cost basic packages. Although it may be possible to obtain a fixed public IP for your home internet connection, it is often at a cost with an initial admin charge for setting this up and then a monthly ongoing cost to maintain the service. Using a dynamic often changing IP address creates its own difficulties for network admins who want to make routers provide services that can be accessed from the internet network using the assigned public IP. For example you may wish to connect to a VPN Server, or your home CCTV Cameras or just wish to connect to a remote router from anywhere on the internet.  But if the IP is constantly changing, how to find it?

Starting from RouterOS v6.14 having a dynamic public IP is no longer a problem with a new feature called IP CloudWe already visited some of the other features of IP Cloud to provide the RouterBOARD with a valid Date and Time service. Besides that ability, this feature also provides services that are similar to those provided by a DDNS (Dynamic DNS) service that are widely available on the Internet. With this feature, we no longer connect to an ever changing IP address which is like trying to hit an ever moving target, but instead use a unique DNS name provided by Mikrotik’s cloud service. In this way whenever the public IP changes the router will send an update to MikroTik so that the router service can still be accessed with the DNS that has been previously generated the first time this service is enabled.

Before this feature was added to RouterOS we had to install complex scripts to use these DDNS services. Not all DDNS services would be able to be supported. With the IP Cloud feature, we just need to go to IP menu, then Cloud, then tick ” Enabled ” and we are done.

IP Cloud Dynamic DNS Service
MikroTik IP Cloud DDNS Service

Before running the IP Cloud feature, you need to first make sure the router is connected to the internet, so that the router can make DNS requests to MikroTik’s Cloud based server. If the status states “updated” then we can use the generated Fully qualified domain name to access the remote router or access services running by routers from anywhere on the internet. Once a minute the router will check the Router’s outgoing Public IP address and will update that IP to MikroTik’s IP Cloud Server. In this way, even though the router’s public IP may vary, we can still remotely access or VPN into the router using that domain name which will never change.

If the router does not have a public IP as it is behind another router elsewhere, then the status information will show “DDNS server received request from IP xxx.xxx.xxx.xxx but your local IP was yyy.yyy.yyy.yyy; DDNS service might not work” (where xxx.xxx.xxx.xxx is the discovered external public IP being used by your network and yyy.yyy.yyy.yyy is the actual internal IP on your outgoing interface. If there is another router between your router and the internet, incoming services may not be reachable as they may be filtered out by a firewall.

The format of the domain name created is based on the RouterBOARD’s serial number, so the domain format is written as follows:

{SN of RouterBoard}.sn.mynetname.net

{SN of RouterBoard} here means the serial number, so the DNS is generated based on the unique serial number of the router. This IP Cloud feature only supports RouterBOARD products and does not support x86 products such as the CHR. Note the MikroTIk router uses the UDP protocol with port 15252 to make initial requests or to update the IP address to the IP Cloud server. If you create firewall filter rules do not block the UDP protocol and the outgoing destination port 15252.

Since RouterOS v6.43, if your router and DNS server also supports IPv6, then DNS AAAA records will also be set to your unique router DNS name and IPv6 Address. Disabling the IP Cloud service on your router deletes the DNS records from MikroTik Cloud Server.

Leave a Comment

Your email address will not be published. Required fields are marked *