Community discussions

MikroTik App
 
ali_hacker
newbie
Topic Author
Posts: 32
Joined: Sat Oct 13, 2007 1:36 pm

No-Ip with Mikrotik not working

Wed Aug 07, 2013 11:01 am

hello
can anyone provide me with most working script to dynamic update my dns with no-ip.com
because i tried most of the scripts and it is not working!
i'm using cloudcore router version 6.1
thanks
 
User avatar
nick3dos
Member Candidate
Member Candidate
Posts: 189
Joined: Fri Apr 29, 2011 11:03 pm
Location: Greece

Re: No-Ip with Mikrotik not working

Wed Aug 07, 2013 11:46 am

I use this script for over two years with no problem.
I run it every two hours...
log info ""

:local ipadd [/ip address get [find interface=pppoe-MODEM1 ] address ]

:local NOIPUser "username"
:local NOIPPass "password"
:local NOIPDomain "yourdomain.myftp.org"

:local IpCurrent ("$ipadd" .\ "/32");
#:log info "$IpCurrent";

:for i from=( [:len $IpCurrent] - 1) to=0 do={ 
  :if ( [:pick $IpCurrent $i] = "/") do={ 
    :local NewIP [:pick $IpCurrent 0 $i];
#:log info "$NewIP";
    :if ([:resolve $NOIPDomain] != $NewIP) do={
      /tool fetch mode=http user=$NOIPUser password=$NOIPPass url="http://dynupdate.no-ip.com/nic/update\3Fhostname=$NOIPDomain&myip=$NewIP" keep-result=no
      :log info "NO-IP Update: $NOIPDomain - $NewIP"
     }
   } 
}
log info ""
 
ali_hacker
newbie
Topic Author
Posts: 32
Joined: Sat Oct 13, 2007 1:36 pm

Re: No-Ip with Mikrotik not working

Sun Sep 08, 2013 7:47 pm

still not working
thank you
 
Rudios
Forum Veteran
Forum Veteran
Posts: 977
Joined: Mon Mar 11, 2013 12:58 pm
Location: The Netherlands

Re: No-Ip with Mikrotik not working

Sun Sep 08, 2013 8:05 pm

Did you check the references to the interfaces to reflect your names used.
 
srcmkt
just joined
Posts: 2
Joined: Mon Oct 28, 2013 7:37 pm

Re: No-Ip with Mikrotik not working

Mon Oct 28, 2013 7:46 pm

I'm having this very same problem.
- Been using the script for about a year.
- My VPN started failing, because the IP didn't get properly updated (that's how I noticed at least).
- When the update script is run through the Scheduler, the logs show that it won't detect any changes in the IP number:
"No-IP: Previous IP xxx.xxx.xxx.xxx is equal to current IP, no update needed.
This information is proven wrong by a quick DNS lookup.
- When the script is manually run, even a minute after the Scheduler just reported "no change" it will return the following:
"No-IP: Current IP xxx.xxx.xxx.xxx is not equal to previous IP, update needed."
"No-IP: Sending update for <username>.no-ip.org." 
Even though the script detected that an update was needed, the IP won't get updated.

I believe it started happening after one of the 6.x updates. Currently I'm running 6.5 and it still doesn't work.

Any ideas ?
 
srcmkt
just joined
Posts: 2
Joined: Mon Oct 28, 2013 7:37 pm

Re: No-Ip with Mikrotik not working

Tue Oct 29, 2013 8:17 pm

Update: I changed my script for this one, and now it works fine:
http://forum.mikrotik.com/viewtopic.php ... 13#p393060

Apparently a bug was introduced in v6.2, something to do with empty variables, that broke the previous script.