Manual:IP/Cloud: Difference between revisions
Line 30: | Line 30: | ||
When enabled '/ip cloud' will send encrypted packets to hosts '''UDP/15252''' port that resolves from '''cloud.mikrotik.com'''. If you have connected a router and it has internet access you will see A record resolved for cloud.mikrotik.com in '/ip dns cache'. | When enabled '/ip cloud' will send encrypted packets to hosts '''UDP/15252''' port that resolves from '''cloud.mikrotik.com'''. If you have connected a router and it has internet access you will see A record resolved for cloud.mikrotik.com in '/ip dns cache'. | ||
{{ Note | When using CHR, a working license (trial or permanent) is required for [[ M:IP/Cloud | IP/Cloud]] to work properly. }} | {{ Note | When using CHR, a working license (trial or permanent) is required for [[M:IP/Cloud| IP/Cloud]] to work properly. }} | ||
== Example == | == Example == |
Revision as of 08:53, 2 July 2018
Applies to RouterOS: v6.27+
Note: Currently running as public beta. Server availability could vary, and syntax could change
Summary
Starting with RouterOS v6.14 MikroTik offers a Dynamic DNS name service for RouterBOARD devices. This means that your device can automatically get a working domain name, this is useful if your IP address changes often, and you want to always know how to connect to your router.
Note: Since RouterOS v6.27 "ip cloud enabled" is renamed to "ip cloud ddns-enabled" this may require some changes in scripts if you are using this feature in a script.
The cloud service provides these services:
- ddns (provide dns name for router's WAN IPv4 address. IPv6 not supported)
- approximate time (accuracy of several seconds, depends on UDP packet latency, useful when NTP is not available)
- time zone detection (if enabled, clock time zone will be updated even when DDNS and update time are disabled)
Note: to actually connect to the router using the DNS name provided by cloud server, user must configure router's firewall to permit such access from the WAN port. (Default MikroTik configuration does not permit access to services such as WebFig, WinBox etc. from WAN port)
Warning: Be aware that if router has multiple public IP addresses and/or multiple internet gateways, the exact IP used for the update may not be as expected!
Operation details
- Router checks for outgoing IP address change: every 60 seconds
- Router waits for cloud server response: 15 seconds
- DDNS record TTL: 60 seconds
- Cloud time update: after router restart and during every ddns update (when router WAN IP address change or after force-ddns-update command)
- Time-zone-autodetect: The time zone is detected depending from router public IP address and our commercial database.;
After router sends it's IP address to the cloud server, it will stay on the server permanently. DNS name (/ip cloud dns-name) will resolve to last sent IP address. When user set /ip cloud set ddns-enabled=no router will send message to server to disable DNS name for this routerboard.
When enabled '/ip cloud' will send encrypted packets to hosts UDP/15252 port that resolves from cloud.mikrotik.com. If you have connected a router and it has internet access you will see A record resolved for cloud.mikrotik.com in '/ip dns cache'.
Note: When using CHR, a working license (trial or permanent) is required for IP/Cloud to work properly.
Example
To enable and activate this service:
[admin@MikroTik] /ip cloud set ddns-enabled=yes [admin@MikroTik] /ip cloud print ddns-enabled: yes update-time: yes public-address: 159.148.172.205 dns-name: 529c0491d41c.sn.mynetname.net status: updated
To enable time update from cloud service:
[admin@MikroTik] > ip cloud set update-time=yes
To enable automatic time zone detection:
[admin@MikroTik] > system clock set time-zone-autodetect=yes
Properties
Sub-menu: /ip cloud
Property | Description |
---|---|
ddns-enabled (yes | no) | If set to "yes" then router will send an encrypted message to the MikroTik cloud server. Server will then decrypt the message and verify that sender is an authentic Mikrotik router. If all is OK then server will create a DDNS record for this router and send response to the router. Every minute the cloud service on the router will check if WAN IP address matches the one sent to server and will send encrypted update to cloud server if IP address changes. |
force-update (command) | When executed, ddns update to cloud server will be sent immediately, even if router's IP address is not changed. Note: if /ip cloud update-time is set to "auto" then router clock will be updated to cloud server time (if no ntp or sntp client is enabled). |
update-time (yes | no) | If set to "yes" then router clock will be set to time, provided by cloud server IF there is no SNTP or NTP service enabled. If set to "no" then cloud service will never update router clock. If update-time = yes, Clock will be updated even when /ip cloud ddns-enabled = no |
public-address (string) | Read only, shows router IPv4 address that was sent to cloud server and assigned to DNS name (see "/ip cloud dns-name"). This field is visible only after at least one ddns-request was successfully completed. |
warning (string) | Read only, shows a warning message if IP address sent by router differs from IP address in UDP packet header as visible by cloud server. Typically this happens if router is behind NAT. Example: "DDNS server received request from IP 123.123.123.123 but your local IP was 192.168.88.23; DDNS service might not work" |
dns-name (string) | Read only, shows DNS name assigned to the router. Name consists of 12 character serial number appended by .sn.mynetname.net. This field is visible only after at least one ddns-request is successfully completed. |
status (status) | Read only, contains text string that describes current dns-service state. The messages are self explanatory
|
Advanced
Sub-menu: /ip cloud advanced
Property | Description |
---|---|
use-local-address (yes | no) | By default, the DNS name will be assigned to the detected public address (from the UDP packet header). If you wish to send your "local" or "internal" IP address, set this to "yes" |