Syed Jahanzaib – Personal Blog to Share Knowledge !

March 30, 2012

Access Mikrotik Remotely via DynamicDNS


~ Article By Syed Jahanzaib ~
Last Updated : 28th January, 2014

If you have Mikrotik Server with DSL connection with dynamic ip , which changes on every reboot / reset, and you want to access mikrotik from the Internet then you can use changeip.com (DynamicDNS) service, using this service, you don’t have to query the DSL IP every time, all you have to remember the domain name that you register on the site, and rest of things will be handled by the DDNS script configured on the Mikrotik.

Following is the the scenario:

…    INTERNET            >>    DSL MODEM          >>> MIKROTIK
User with WINBox            (with dynamic ip)

DSL MODE IP              =   192.168.30.1
MIKROTIK WAN IP =  192.168.30.5

Ok Lets Start.

CONFIGURE DSL MODEM TO ENABLE PORT FORWARDING

First open you DSL Modem page to enable PORT Forwarding (from DSL Modem to Mikrotik box)
Now add Port Forwarding rule

WINBOX uses TCP Port 8291
As showed in the image below . . .

Now Click on SAVE / APPLY

.

CREATE NEW ACCOUNT ON CHANGEIP.COM

Now Open http://www.changeip.com in your browser and register new account.
As showed in the image below . . .

1


2

Now it will send you an confirmation email, Open your mail box, and click on the link it have send you to activate your account.

ADD DOMAIN NAME TO YOUR ACCOUNT

Login to see your account , by default no domain name is added, Just click on DNS MANAGER to add your required name


As showed in the image below . . .

3

Now you have to add your own desired name and its domain.  You can select various domains from the drop down list.
As showed in the image below . . .

4

After adding your domain name, You can see your domain name in the main page,

As showed in the image below . . .

5

Now its time to configure the DynamicDNS script on the Mikrotik.

CONFIGURE DDNS SCRIPT AND SCHEDULER ON MIKROTIK

Login to Mikrotik via WINBOX,
Goto Scripts / and new script.

Paste following into the script

SCRIPTNAME : ddns-script-behind-dsl-modem

Script Code tested with MIKROTIK version 6.xx

# Set your specific ChangeIP.com preferences here.
:global ddnsuser "CHANGEIP USERNAME"
:global ddnspass "PASSWORD"
:global ddnshost "YOUR-FREE-DDNS SITE NAME"
# Change ddnsport to 8245 to bypass proxy.
:local ddnsport 80
 
# Do not edit anything below this line. You have been warned.
# Abusive updates to the system will cause firewall blocks.
 
# Please be considerate and
# do not let this script run more than once per 3-5 minutes.
 
:log info "DDNS: Starting."
 
# Initialize checkpoint
:global ddnscheckpoint
:if ([:typeof $ddnscheckpoint] = "time") do={
 :log info ("DDNS: Last check was " . ([/system clock get time] - $ddnscheckpoint))
} else={
 :log info "DDNS: Cannot determine checkpoint, set now."
 :global ddnscheckpoint ( [/system clock get time] - 1d )
}
 
# Get the current IP
:if ([/system clock get time] - $ddnscheckpoint > [:totime 180s] || [/system clock get time] - $ddnscheckpoint < [:totime 0s]) do={
 :log info "DDNS: Performing remote IP detection."
 /tool fetch address="ip.changeip.com" host="ip.changeip.com" src-path=("/?" . [/int eth get 0 mac-address ]) dst-path="ip.changeip.com.txt" mode=http port=$ddnsport
 :global ddnscheckpoint [/system clock get time]
} else={
 :log info "DDNS: Please be considerate and wait a few seconds longer."
 :break
}
 
# Parse the IP address received from fetch script.
 :global ddnslastip
 :local html [/file get "ip.changeip.com.txt" contents]
 :local ddnsip [:pick $html ([:find $html "<!--IPADDR="] + 11) [:find $html "-->"] ]
 
# Is it a valid IP and is it different than the last one?
 :if ([:typeof [:toip $ddnsip]] = "ip" AND $ddnsip != $ddnslastip ) do={
 :log info "DDNS: Sending UPDATE with $ddnsip"
 :log info [/tool dns-update name=$ddnshost address=$ddnsip key-name=$ddnsuser key=$ddnspass ]
 :global ddnslastip $ddnsip
 } else={
 :log info "DDNS: No update required."
 }
}

 

Script for Mikrotik ver 6.x  [CODE FOR PPP DIALER WHERE INTERNET IS DIRECTLY CONNECTED ON MIKROTIK

:local ddnsuser "USERNAME"
:local ddnspass "PASSWORD"
:local ddnshost "CHANGEIP_YOUR_WEB_NAME"
:local ddnsinterface "WAN_INTERFACE"
:global ddnslastip
:global ddnsip [ /ip address get [find interface=$ddnsinterface disabled=no] address ]
:if ([ :typeof $ddnslastip ] = nil ) do={ :global ddnslastip 0.0.0.0/0 }

:if ([ :typeof $ddnsip ] = nil ) do={
:log info ("DDNS: No ip address present on " . $ddnsinterface . ", please check.") } else={
:if ($ddnsip != $ddnslastip) do={
:log info "DDNS: Sending UPDATE!"
:log info [ /tool dns-update name=$ddnshost address=[:pick $ddnsip 0 [:find $ddnsip "/"] ] key-name=$ddnsuser key=$ddnspass ]
:global ddnslastip $ddnsip } else={
:log info "DDNS: No change" }
}

As showed in the image below . . .

To verify that the script is pasted and working properly,
Goto SYSTEMS   >  SCRIPTS , and double click on the DDNS to view its contents, Just verify it everything is in place.
As showed in the image below . . .

Okay, as the script is in place, its time to Execute the script so it can update the current WAN IP to your DynamicDNS account.

As showed in the image below . . .

As you can see that the script have updated the record to dynamicDNS account, its time to verify it.

ADDING SCHEDULER (So it can update record after every 5 minutes)

Also add this in scheduler so it can run after every 5 minutes, you can adjust it as per your requirement.

/system scheduler
add disabled=no interval=5m name="Run DDNS every 5 minutes" on-event=update-ddns policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api start-date=mar/30/2012 start-time=14:24:00

VERIFY UPDATED IP RECORD ON CHANGEIP.COM

Go back to changeip.com and see your domain name record by clicking on

View Recent DDNS Updates

As showed in the image below . . .

6

Now it will show you the updated Record.

As showed in the image below . . .

7

Everything is now ready and in place.

TEST TIME !!!


CONNECT TO YOUR MIKROTIK FROM INTERNET

Its time to hit the road. From any other Remote PC with separate internet connection, try to ping your domain name and try to connect it via winbox or try open it in your browser,

NTOE: In the image below, I used another domain name, as at the moment I only had old image , so ignore the name, just understand the logic

As showed in the images below . . .

.

.

TIP: Script for DSL Modem in BRIDGE Mode …

If you have DSL Modem configured in BRIDGE mode, and you are dialing via Mikrotik PPPoE Client Dialer, then use the following Script.

NOTE:

Make sure you change the user id + password + host name to match the same you have entered at the time of registration.
Most importantly donot forget to change the interface name (for example pppoe-out1 or likewise

Following Script have been taken from
http://wiki.mikrotik.com/wiki/Dynamic_DNS_Update_Script_for_ChangeIP.com

ddns-script-modem-in-pppoe-mode- code.

:global ddnsuser "user-aacable"
:global ddnspass "passwd"
:global ddnshost "full hostname"
:global ddnsinterface "pppoe-out1"
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# END OF USER DEFINED CONFIGURATION
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:global ddnssystem ("mt-" . [/system package get [/system package find name=system] version] )
:global ddnsip [ /ip address get [/ip address find interface=$ddnsinterface] address ]
:global ddnslastip
:if ([:len [/interface find name=$ddnsinterface]] = 0 ) do={ :log info "DDNS: No interface named $ddnsinterface, please check configuration." }
:if ([ :typeof $ddnslastip ] = "nothing" ) do={ :global ddnslastip 0.0.0.0/0 }
:if ([ :typeof $ddnsip ] = "nothing" ) do={
:log info ("DDNS: No ip address present on " . $ddnsinterface . ", please check.")
} else={
:if ($ddnsip != $ddnslastip) do={
:log info "DDNS: Sending UPDATE!"
:log info [ :put [/tool dns-update name=$ddnshost address=[:pick $ddnsip 0 [:find $ddnsip "/"] ] key-name=$ddnsuser key=$ddnspass ] ]
:global ddnslastip $ddnsip
} else={
:log info "DDNS: No changes necessary."
}
}
# END OF THE SCRIPT

.

Regard’s
Syed Jahanzaib

99 Comments »

  1. Thanks

    Like

    Comment by jackobarca — March 30, 2012 @ 4:27 PM

  2. Thank you very much for these instructions. I am using load balancer rb750 and then use mikrotik hotspot. Kindly guide me how can I use these instructions as two mikrotik systems are running.

    Again thank you very much.

    God bless you brother.

    Like

    Comment by Muhammad Fawad — March 30, 2012 @ 9:11 PM

    • Dear Sir,

      I followed all the steps as per your instructions. Ping is ok. But when I put the link to winbox, I get the following error :
      ” Could not fetch index from 111.111.111.111:80: Not Found”

      Please guide me.

      Thank you.

      Like

      Comment by Muhammad Fawad — April 1, 2012 @ 1:03 PM

      • It Depends on your configuration 🙂

        How can I tell how you have configured , Have you configured the PORT Forwarding rule at DSL Mode ?
        Are you able to ping the Mikrotik Server from remote computer using DNS Name (ddns working?)

        There are few things that you have to troubleshoot at your end.

        Like

        Comment by Syed Jahanzaib / Pinochio~:) — April 1, 2012 @ 6:56 PM

      • aslam o elikum sir maiin nay sub kar lya butt mikrotik kay bajay mera modam poen hota hay jub main apni web browser main apni id search karta hoo any idea plz send me

        Like

        Comment by hbnservices — July 2, 2012 @ 10:28 AM

  3. Yes sir, I am able to ping the remote computer using DNS Name i.e ddns is working fine.

    Like

    Comment by Muhammad Fawad — April 1, 2012 @ 8:40 PM

  4. Asalam O Alikum Jahanzaib Bhai,

    thanks again for the great article/sharing..

    sir i`ve dont all these things and it worked when i run the script for the first time after configuration, i got my ip updated on the server, i ping my server with my host name and it worked, but after getting another ip when i`m trying to run the script it just add run count, nothing is shown in log section of RB nor my ip address is updating on changeip.com…

    what possibly could be the problem

    m attaching screenshots as well..

    if possible, have a look on that.. otherwise it totally fine sir..

    Thanks and keep up the good work boss.. u r helping alot 🙂

    Thanks & Regards.
    Zohaib

    http://imageshack.us/photo/my-images/29/ynotworking.jpg/

    Like

    Comment by Zee — April 2, 2012 @ 3:11 AM

    • DDNS Script will not update IP if the current WAN ip and Last WAN IP is same.

      Try removing old entry in \
      SYSTEMS > SCRIPTS > ENVIRONMENT

      Like

      Comment by Syed Jahanzaib / Pinochio~:) — April 2, 2012 @ 8:37 AM

      • hi,sir
        plzz,,i beg u to help me.
        main ny mikrotik 5.0 level 6 purchase kia tha before 3 years
        but,,
        m us ka username and password bhool chuka hun
        aur main ny uski koi backup file bhi nhi thi bnai
        so plzzzzz,,,help me…..
        ubuntu k through kasy password recover krna hai
        plzzzz…zzzz
        1 year sy mera mikrotik off pra hai
        thanks plzz,,,,,,,,

        Like

        Comment by Slemon — May 22, 2012 @ 2:29 AM

      • You can move this harddisk to any other pc running ubuntu or boot via ubuntu cd.
        step by step guide is available here.

        https://aacable.wordpress.com/2012/01/14/howto-recover-mikrotik-admin-account-forgotten-password/

        Like

        Comment by Syed Jahanzaib / Pinochio~:) — May 22, 2012 @ 8:46 AM

      • Thank u very much SIR,,,
        i am very thankfull to you,,
        INSHA-ALLAH,aaj raat ko try krun ga and INSHA-ALLAH aap ki help sy zrur kamyaab ho jaun ga
        thanks again.
        and
        SIR,
        one more thing,i want to ask you,
        mera server main USERS ,,ARP main creat hotay hain,
        but,
        i want convert ARP to HOTSPOT,but
        i don`t know howww,,
        THANK YOU,

        Like

        Comment by Slemon — May 22, 2012 @ 7:31 PM

      • Just configure hotspot.

        Like

        Comment by Syed Jahanzaib / Pinochio~:) — May 25, 2012 @ 8:54 AM

      • Sir,
        ye Load Balancing ma kia asa he hota hai
        internet conection speed “2MB + 2MB = 4MB”
        downloading speed(transfer rate) “256KB + 256KB = 512KB”

        thanks ,

        Like

        Comment by Slemon — May 22, 2012 @ 7:35 PM

      • Possible.

        Like

        Comment by Syed Jahanzaib / Pinochio~:) — May 25, 2012 @ 8:53 AM

      • Aslam-u-Alaikum,
        Sir,
        ARP pakage khatm kr k Hotpot ka pakage install krny ka method bta dain plzzzzzzzzz….
        thank u,,

        Like

        Comment by Slemon — May 25, 2012 @ 4:02 PM

      • Aslam-u-Alaikum..
        hello,,hiiii…..

        Sir gggg,,,

        aap ny to hotspot configure krny ka tareeqa btaya ha
        but mry mikrotik m to IP/HOTSPOT ki option he nhi hai to configure kasy krun
        mry mikrotik main IP/ARP ki option ha jis main main apny users add krta hun
        so plzzz,,,rquest to you k pehlay waly pakages uninstall kr k new pakages kase install krna hain
        like (HOTSPOT)install krna hai aur (ARP)unistall krna hai
        thank u,,
        Slemon

        Like

        Comment by Slemon — May 25, 2012 @ 8:02 PM

  5. Good Work its worked fine…………..

    Like

    Comment by Rana Kamran — April 5, 2012 @ 7:42 PM

  6. Simply Great, Thats Why We Love U:p

    Like

    Comment by Shery — April 10, 2012 @ 9:10 AM

  7. Plz can u tell me how to bypass dlink hotspot login page bcos internet access payment is included in our school fee and yet the internet provider still ask us to buy hourly or monthly authentication credentials before using the internet-injustice to we students. So any feasible steps will be appreciated. Tnx

    Like

    Comment by evaboy — April 11, 2012 @ 9:34 PM

  8. DSL MODE IP = 192.168.1.1
    DSL MODE IP = 192.168.2.1
    load balancer IP = 192.168.3.1
    load balancer is PFSENSE
    MIKROTIK WAN IP = is DHCP CILENT

    ho to create your rulls ?????????

    Like

    Comment by WASEEM AHMED — April 28, 2012 @ 4:43 AM

  9. Slam bhai! jb main ya script new terminal mein past kerta hon then ya msg ata hai input does not match any value of policy Please help me

    Like

    Comment by smn4all — May 3, 2012 @ 1:58 PM

  10. Dear Sir jahanzeb i have issue in my MTK when i ever i had paste this DDNS script i got input does not match error please advicde and help.

    Like

    Comment by owais — May 3, 2012 @ 3:25 PM

  11. Assalamu alikum Bro this is Nahid from Bangladesh. I want to know that, Can I use one Dynamic DNS Account for my 3 mikrotik Router for remote access. or should I have unique account for each Mikrotik to manage them remotely..?

    Like

    Comment by GSB NAHID — May 22, 2012 @ 9:30 AM

  12. Aslam-u-Alaikum..
    hello,,hiiii…..

    Sir gggg,,,plzzz..yeh bta dain

    aap ny to hotspot configure krny ka tareeqa btaya ha
    but mry mikrotik m to IP/HOTSPOT ki option he nhi hai to configure kasy krun
    mry mikrotik main IP/ARP ki option ha jis main main apny users add krta hun
    so plzzz,,,rquest to you k pehlay waly pakages uninstall kr k new pakages kase install krna hain
    like (HOTSPOT)install krna hai aur (ARP)unistall krna hai
    after mikrotik installation new pakage HOTSPOT kasy install krna hai
    thank u,,
    Slemon

    Like

    Comment by slemon — May 31, 2012 @ 12:28 AM

  13. como usar este script en un mikrotik con configuracion ppc y escoger alguna de las wan y que detecte la ip exterior a la nat???? u otro para multiples wan’s y forzar unicamente un dns dinamico por wan que escoja?

    Like

    Comment by Eduardo — June 25, 2012 @ 8:45 PM

    • how to use this script in a configuration mikrotik with ppc and choose one of the wan ip and detected outside the nat?? or another for multiple wan’s and force only for a dynamic dns wan to choose?

      Like

      Comment by Eduardo — June 25, 2012 @ 8:46 PM

  14. i am Helpless from every side can anyone help me to configer remote winbox through Team Viewer………….if so plz contact me my email is m.jaffarsaleem@rediffmail.com , same on facebook

    Like

    Comment by Jaffar Saleem — July 17, 2012 @ 10:52 PM

  15. Aslam Alekum

    everything is fine, but when i am trying to browse my link it will showing dsl modem configuration, how can i solve that type of problem ? ? ? and where I need to change interface in script ? ? ?

    Like

    Comment by Charanzia — July 22, 2012 @ 7:46 PM

  16. please reply….

    Like

    Comment by Charanzia — July 31, 2012 @ 1:31 PM

  17. Awesome Post !!! Hat’s off to you out there 🙂 I was always worried whenever i go out how would i track my system?? I am not a Network student but more over a Computing student but i have managed my network through Mikrotik 750G 🙂

    Like

    Comment by Nimesh Amatya — August 6, 2012 @ 7:09 AM

  18. I have setup pcc load balancing.
    I used my first pppoe in the script and voila! it is working.

    Thank you for the great share,

    Like

    Comment by badr — August 17, 2012 @ 3:18 PM

  19. not working with 5.19

    Like

    Comment by Zeeshan — August 20, 2012 @ 11:04 AM

    • It is working perfectly on mine 5.19. Although I am using the second method I don’t know about the first one

      Like

      Comment by badr — August 22, 2012 @ 4:30 PM

  20. second method? what was it? i am not using bridge mode dsl router is there any other way?

    Like

    Comment by Zeeshan — August 23, 2012 @ 1:30 PM

  21. Syed Jahanzaib sir how are you i need some help for mikrotik plz can you give me your mobile number or email plz send me on this email . w.ku@live.com

    Like

    Comment by waqar haider — August 28, 2012 @ 5:47 PM

  22. I have 2 public IP running on 2 RB1100AH. can i gain assess into the other using winbox.

    Like

    Comment by Sly — November 1, 2012 @ 10:46 AM

  23. can i login to another winbox from inside a winbox as the link on the other end is slow and both are running on public IP which i can ping from one of the winbox but due to slow network winbox cant login, but i ping and get a reply from another winbox of another location>

    Like

    Comment by Sly — November 1, 2012 @ 10:50 AM

  24. dns update successful to kehta hai par 1 din baad open nahe hota, internet ip change hone ki wajha se? kya last wan ip hat nahe skti script se ?

    Like

    Comment by Zeeshan — November 22, 2012 @ 1:01 PM

  25. AsalaamuAlaikum brother,

    Brother I want to configure ddns on the back end router. I have two routers, one of which is configured as pcc load balancer and second one is configured as hotspot.

    I want to access hotspot remotly.

    Could you please explain how can i access it?

    Thanks

    Like

    Comment by nominet — March 26, 2013 @ 9:02 PM

  26. hello sayed
    i have fake ip on my mikrotik
    so if i put the fake ip in changeip.com i can ping it from my lan but not from international..
    so what i should do !

    Like

    Comment by Hussein — April 14, 2013 @ 8:32 PM

    • fake/private ip is not routeable ip.
      it will work only in private lan.

      DDNS is intended to be used for public ips only that changes frequently on every connection/reconnection.

      Like

      Comment by Syed Jahanzaib / Pinochio~:) — October 7, 2013 @ 11:47 AM

  27. Thanks Sir 50% problem gone now
    i will access by anroid through gprs anywhere
    **Thanks* *Thanks**Thanks**

    Like

    Comment by your`s online student — June 13, 2013 @ 4:18 AM

  28. Hi. The script was working fine. Once I upgraded routeros to 6.0 it doesn’t work anymore. Do you have any idea?

    Thanks,

    Like

    Comment by HRDHKR — August 21, 2013 @ 3:08 PM

  29. Sir…
    Ping to host ok, but when you try to log in via winbox, stopped in connecting to “the ip for change ip.com:80 (8291)”
    like this
    what does that means ?

    Like

    Comment by esalehnet — November 6, 2013 @ 1:29 AM

  30. ive managed to done this tutorial,now i want my cctv to be viewable online. how do i do that?
    my dvr ip address : 192.168.88.11
    my website:azhaarmaju.zapto.org

    thanks in advance

    Like

    Comment by nazir — January 23, 2014 @ 1:25 AM

  31. any tutorial for that? i have tried almost everything.

    Like

    Comment by nazir — January 23, 2014 @ 6:25 PM

  32. please have a look and comment on my setup ;

    http://postimg.org/gallery/301ct6hfy/

    so sorry for bothering you. i could view the dvr on my wlan network. i cant connect to it from outside of my network.

    Like

    Comment by nazir — January 23, 2014 @ 7:01 PM

    • The rule seems fine to me, make sure there is no port conflicting, for example change the mikrotik web port to some other, or change the dvr port preferably.

      Like

      Comment by Syed Jahanzaib / Pinochio~:) — January 28, 2014 @ 3:13 PM

  33. It was an easy setup. Thanks for the great tutorial.

    Like

    Comment by nazir — January 28, 2014 @ 9:39 PM

  34. sir … is that work on multi wan links + pcc load ballencing

    Like

    Comment by waqas — March 1, 2014 @ 9:10 PM

  35. ager load balancing ke ho to kayasa karna ho ga

    Like

    Comment by Zeeshan — March 24, 2014 @ 7:01 PM

  36. Sri aap ki post sari parta hoon Masha Allah aap sab ki help kartay hain.
    mai ne sir change ip dsl setting aor script add ki hai sab theek hai lekin rb450g se pehlay loadbalancer hai winbox open nai hoo raha web ping karta hai hits b aaa rahay hain lekin could not fetch index from (ip address 182….):80 gateway time out aa jata hai
    sir plz help me
    thanks

    Like

    Comment by Irfan Manj — April 20, 2014 @ 8:45 AM

  37. Sir, I’m using mikrotik 5.18 n one of my user access his dvr from outside, but while giving ddns address, he simply redirects to my router Login(Mikrotik Login) Page. Can U pls provide any solution, I don’t know anything about scripts.so pls mail me the script n execution procedure. here is my mail id: pavankatepalli1905@live.com

    Like

    Comment by Pavan — May 2, 2014 @ 10:43 PM

  38. Me too having same issue, I’m a starter in ISP and one of my user using DVR with static Private IP(172.16.16.18) and ddns(****.hifocusddns.com)
    Ports using
    TCP: 37777
    UDP: 37778
    HTTP: 80, 8080
    but while ping to ddns i redirects to my Mikrotik login page even I gives port forward

    Like

    Comment by Pavan — May 3, 2014 @ 9:01 AM

  39. Hello Bro, This Nahid from Bangladesh, I am using your script thats working fine. but my problem that i am facing, when my router reboot or power fail for few minutes then script dont running automatically. If I manually run the script then again its work as per scheduler. my scheduler run count is updating but script not running automatic. What can I do? Please Help?

    Like

    Comment by Nahidul Islam — May 20, 2014 @ 9:03 PM

  40. Hello brother, when i run the first script it writes ddns error: authenticating failure.

    Like

    Comment by masterkomas — June 23, 2014 @ 6:31 PM

  41. AssalamuAlikum sir!!!! sir maine ye script use ker k dekha hai its working fine thx for that. but i m facing littlebit prob. jab light jati hai tu script automaticaly run nai hota manual run krna perta hai plz help me how can i automaticaly run that script thx…

    Like

    Comment by salman Aslam — August 9, 2014 @ 5:52 PM

    • you should SCHEDULE it to run after every 5 or 10 minutes. something like.
      ADDING SCHEDULER (So it can update record after every 5 minutes)

      Also add this in scheduler so it can run after every 5 minutes, you can adjust it as per your requirement.

      /system scheduler
      add disabled=no interval=5m name="Run DDNS every 5 minutes" on-event=update-ddns policy=\
      ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api start-date=mar/30/2012 start-time=14:24:00

      Like

      Comment by Syed Jahanzaib / Pinochio~:) — August 14, 2014 @ 4:08 PM

  42. hi anyone can help me regarding mikrotik port forwarding
    i want to use remote desktop but mikrotik doest allow to pass. without mikrotik router directly connected to dsl modem it is working fine.
    my setup is below:

    dsl modem: 192.168.1.1

    mikrotik router ether1 192.168.1.100 as dhcp client
    mikrotik ether5 10.10.20.0/25

    please help to configure with the above setup the pc inside ether5 need to remote desktop..thanks in advance.

    Like

    Comment by Rey — September 20, 2014 @ 5:04 PM

    • simple port forward will do the trick.
      first you have to port forward from dsl to mikrotik. then on mikrotik you have to do port forward rdp port from the mikrotik to local rdp system. make sure local rdp system is suing your mikrotik as its default gateway.

      Like

      Comment by Syed Jahanzaib / Pinochio~:) — September 22, 2014 @ 3:42 PM

  43. Good Morning Ponicio 🙂
    First of all, marry christmas and a hapy now year in advance!
    You have saved my day, your script for pppoe-out updating changeip was the first which was working on my mikrotik 6.2 😀
    Would it be possible to modify it for dyndns?
    Would be very nice and for me a delayed christmas present 🙂

    Thanks in advance!

    Joachim

    Like

    Comment by Joachim Zauner — December 27, 2014 @ 1:11 PM

  44. assalamu alaikum
    brother I have made every thing as above and I can open the webfig and winbox using the ip change domain but I can’t open the sestem cause it says username or password error !!! would you please help me .

    Like

    Comment by battarovov — January 10, 2015 @ 4:03 AM

    • at where you are getting id password error? winbox or what?

      Like

      Comment by Syed Jahanzaib / Pinochio~:) — January 10, 2015 @ 12:08 PM

    • same issue with me. DDNS successfully updated but error during log.in thru webfig or winbox. 😦
      when using browser, error is “Authentication failed: invalid username or password.” when using winbox “ERROR: wrong username or password”.
      help on error is greatly appreciated. thanks.Syed.

      Like

      Comment by jokosovo — January 14, 2017 @ 3:59 AM

  45. Salam Sir Jahanzaib,

    mera pass 4mb+4mb=8mb
    IP: 192.168.1.1 connect internet (4mb)
    IP: 192.168.2.1 PTCL Internet (4mb)
    Load Balance on Mickrotik 192.168.0.1
    another Mickrotik(10.10.10.1) for User manage(Hotspot) and DHCP .

    simple to hogaya mgar usermanager wale MT ko dekhna chahta hn anywhere.
    kesa hosakta h.

    Like

    Comment by Ali — January 29, 2015 @ 1:32 PM

  46. Asslam O Aliakum Brother i have done all process ,,main ne change ip pe domain bhi bna li ha ddns sript bhi download kr li ha save bhi kr di ptcl main port bhi isi tar 4wd ki ha laikin work updat nai ho rah mery pas rb750 ha ,,main ne sript main user pasword aur host likh dia ha par user inter face main kia likhna ha plz brother little help

    Like

    Comment by Najeeb Ullah — March 5, 2015 @ 3:58 PM

    • in interface, mention WAN interface name

      Like

      Comment by Syed Jahanzaib / Pinochio~:) — March 6, 2015 @ 3:54 PM

    • You can use MAC login feature in Mikrotik which can be used to authenticate user via there MAC automatically so they will auto login with assigned profile, this is official method.
      secondly you can bypass users from login page by adding them in BYPASSED MAC list, but not recommended as not policy will be applied to them.

      Like

      Comment by Syed Jahanzaib / Pinochio~:) — March 6, 2015 @ 3:56 PM

  47. Dear Sir ,
    many thanks of your efforts
    when applying the script for version 6 , i faced some strange things :
    1- when we put Wan interface as the ddns interface script doesn’t work , but it works with Lan !!!!!!
    2-when using Lan updates come with the internal IP so i can’t access anything

    can you explain for us where the maistake

    Like

    Comment by hadyatef — April 14, 2015 @ 4:55 PM

  48. aoa sir

    sir main nay 4 dsl connection lagye hain un ko ik connection me merge kiya hy tplink kay load balancer sasy tplink tl 470+ say us kay agy mikrotik server lagya hy to kiya main is tarah apna winbox over internet access kar sakta hon ? kindly if its possible then how to configure it

    Like

    Comment by waqas ahmad waseer — November 22, 2015 @ 12:21 AM

    • yes its possible. you have to do port forwarding in TPLINK > mikrotik.
      open tplink management web panel and make port forward rule. you can search web on howto make port forward rule in your specific tplink model. generally its very easy.

      Like

      Comment by Syed Jahanzaib / Pinochio~:) — November 23, 2015 @ 8:48 AM

  49. Good day Sir.

    I had this script working for years. All of a sudden it stopped working last week. Funny enough Changeip also did maintenance. Their support claim though that nothing changed. None of my various routers on various ISP are updating. I am either getting an error to connect to server in logs or it shows no DDNS changes necessary although IP in portal is not updated and points wrong.

    Are you experiencing the same?

    Help will be so much appreciated.

    Regards,
    Riaan

    Like

    Comment by Riaan Griesel — December 1, 2015 @ 2:29 AM

    • This is to confirm that probably issue is from changeip.com , i tested it with ver 5.20 and 6.3x.x
      wait few days maybe it will resolve automatic or new script will come.

      Like

      Comment by Syed Jahanzaib / Pinochio~:) — December 1, 2015 @ 2:12 PM

  50. Hello can someone help me how access mikrotik from anywhere in the world please really urgent

    My email espace.net001@gmail.com

    Skype:…william.persey

    Like

    Comment by espace — February 24, 2016 @ 7:56 PM

  51. hello, this is nice tutorials
    just for you know
    i was write same article like this (About Remote mikrotik from anywhere)
    but i use different way
    i use vpn client, and its very simple and work
    if u interest just visit this link
    http://catatan-lamers.blogspot.co.id/2016/06/cara-mudah-mengkakses-mikrotik.html

    Thanks

    Like

    Comment by Maruf Zainuddin — June 24, 2016 @ 3:25 PM

  52. hello. I followed your tutorial and I was able to update the ddns successfully.
    but when I tried to log.in, it will not allow me. when using browser, error is “Authentication failed: invalid username or password.” when using winbox “ERROR: wrong username or password”.

    also in webfig this is displayed: “RouterOS v6.30.4”. But I have “RouterOS v6.37.3”.

    is there any incompatibility with the script and my ROS version?

    Like

    Comment by jokosovo — January 14, 2017 @ 3:47 AM

  53. hello sir i configure ddns script and sheduler on mikrotik5.20 and my sheduler working okk but remotely winbox not access same on webfig plz tell me what to do so

    Like

    Comment by aftab — April 16, 2017 @ 4:38 PM

    • First, You make sure that your public ip is updating on ddns web site panel. login to your ddns account at chagneip.com, goto dns manager, and see if your current public ip is updated.
      second, how your wan link is configured? are you using dsl in bridge mode and dialing via mikrotik? if yes then it should be straight forward setup.

      Like

      Comment by Syed Jahanzaib / Pinochio~:) — April 17, 2017 @ 11:12 AM

  54. excuse me, thanks for your article, it seems work, but i have problem. When I accessed the url that i had create in change-ip.com, it went in to my dsl router rather than my mikrotik page. Could you help me?

    Like

    Comment by Fredy — November 17, 2017 @ 7:11 PM

    • my current public ip is updated, it said my user agent is mikrotik. my dsl modem is not configured using bridge but it configured with PPOE mode, but my mikrotik didn’t using PPOE to connect to internet. so what script i should use?. looking forward for your reply. Thanks

      Like

      Comment by Fredy — November 17, 2017 @ 7:43 PM

    • i found a way to make it works, i add my public ip in my eth 1, this answer my problem it seems my port forwading not working. i check my firewall there is no rule that block winbox. So maybe i should check my port forwading, any idea how i fix it?

      Like

      Comment by Fredy — November 17, 2017 @ 8:54 PM

    • you need to do port forward from the dsl modem to mikrotik ip.

      Like

      Comment by Syed Jahanzaib / Pinochio~:) — November 20, 2017 @ 4:42 PM

  55. sir mery pass 2 mikrotik servers hain aik loadbalance configure hai or second pppoe server hai.
    jab may ddns say apna serveracess krta hu to mera loadbalnce open hota ha server nahi please btayen kaise kro ><

    Like

    Comment by usman yousaf — January 14, 2018 @ 3:47 PM

  56. AOA
    I am using this script in my mikrotik and its working perfectly, Only have one issue.
    I am using the script with two WANS with recursive (if default gateway is not responding it takes other WAN route) in my mikrotik.Only the issue is that script
    tries to update the default WAN public ip doesn’t mater this route is responding or not, Need a little help with the changing in this script that, if WAN1 gateway is not responding it try to get public ip from WAN2 if WAN2 is not responding it try to get from WAN3 and so on to WAN4.Script gets the wan2 ip if we disable the WAN1 ( Default wan) otherwise it only try to get the ip from wan1.

    Bundle of thanks in advance

    Like

    Comment by ayubwaheed — June 5, 2018 @ 10:59 AM

    • well you can add an check to ping some internet host (that should always go via wan1), if no response then it should get ip from wan2. simple is that.

      Like

      Comment by Syed Jahanzaib / Pinochio~:) — June 6, 2018 @ 7:05 PM

  57. i need 5.20 scirpt pls

    Like

    Comment by dolon — July 1, 2018 @ 2:55 AM

  58. error is
    please be consider and wait few second longer
    i dond understand this
    please syed jahanzaib update me.. thanks

    Like

    Comment by bilal yousaf — November 20, 2018 @ 2:46 PM


RSS feed for comments on this post. TrackBack URI

Leave a comment