Community discussions

MikroTik App
 
zaiclopz
just joined
Topic Author
Posts: 10
Joined: Fri Jul 07, 2017 6:48 pm

Really? No No-Ip working script?

Fri Jul 07, 2017 6:50 pm

Hello,

I have mu RB2011 on 6.39.2, and i can not get any No-Ip update script to work..
Is there really no option as for today?
Thank you.
 
maasoey
just joined
Posts: 2
Joined: Fri Jul 07, 2017 10:09 pm

Re: Really? No No-Ip working script?

Fri Jul 07, 2017 10:19 pm

This works on my RB2011:
 	 :local noipuser "dsfargeg@dsfargeg.no"
:local noippass "password"
:local noiphost "dyndnshost"
:local inetinterface "sfp1"

:global previousIP

if ( [:len [/file find name=("no-ip_ddns_previousip.txt")]] > 0 ) do={
:set previousIP [/file get ("no-ip_ddns_previousip.txt") contents]
}


:if ([/interface get $inetinterface value-name=running]) do={
:local currentIP [/ip address get [find interface="$inetinterface" disabled=no] address]

:for i from=( [:len $currentIP] - 1) to=0 do={
:if ( [:pick $currentIP $i] = "/") do={ 
:set currentIP [:pick $currentIP 0 $i]
} 
}

:if ($currentIP != $previousIP) do={
:log info "No-IP: Current IP ($currentIP) is not equal to previous IP ($previousIP), update needed"

:local url "http://dynupdate.no-ip.com/nic/update\3Fmyip=$currentIP"
:local noiphostarray
:set noiphostarray [:toarray $noiphost]
:foreach host in=$noiphostarray do={
:log info "No-IP: Sending update for $host"
/tool fetch url=($url . "&hostname=$host") user=$noipuser password=$noippass mode=http dst-path=("no-ip_ddns_update-" . $host . ".txt")
:log info "No-IP: Host $host updated on No-IP with IP $currentIP"
/file print file=("no-ip_ddns_previousip.txt")
:delay 3
/file set contents="$currentIP" ("no-ip_ddns_previousip.txt")
}
} else={
:log info "No-IP: Previous IP $previousIP is equal to current IP, no update needed"
}
} else={
:log info "No-IP: $inetinterface is not currently running, so therefore will not update."
}

 
Van9018
Long time Member
Long time Member
Posts: 558
Joined: Mon Jun 16, 2014 6:26 pm
Location: Canada - Abbotsford

Re: Really? No No-Ip working script?

Sat Jul 08, 2017 12:17 am

The most basic script is to just send an update every minute. NoIP hasn't blocked me from sending so many updates.

The \3F in the script below translates to a question mark. By excluding my IP from the host, NoIp will use the IP that sent the request.
/tool fetch url=("http://dynupdate.no-ip.com/nic/update\3Fhostname=host.domain.com") user=username password=password mode=http dst-path=("NoIpResponse.txt")
When there are no changes in the IP, NoIP returns "nochange" which is seen in NoIpResponse.txt
 
zaiclopz
just joined
Topic Author
Posts: 10
Joined: Fri Jul 07, 2017 6:48 pm

Re: Really? No No-Ip working script?

Sat Jul 08, 2017 2:50 pm

This works on my RB2011:
 	 :local noipuser "dsfargeg@dsfargeg.no"
:local noippass "password"
:local noiphost "dyndnshost"
:local inetinterface "sfp1"

:global previousIP

if ( [:len [/file find name=("no-ip_ddns_previousip.txt")]] > 0 ) do={
:set previousIP [/file get ("no-ip_ddns_previousip.txt") contents]
}


:if ([/interface get $inetinterface value-name=running]) do={
:local currentIP [/ip address get [find interface="$inetinterface" disabled=no] address]

:for i from=( [:len $currentIP] - 1) to=0 do={
:if ( [:pick $currentIP $i] = "/") do={ 
:set currentIP [:pick $currentIP 0 $i]
} 
}

:if ($currentIP != $previousIP) do={
:log info "No-IP: Current IP ($currentIP) is not equal to previous IP ($previousIP), update needed"

:local url "http://dynupdate.no-ip.com/nic/update\3Fmyip=$currentIP"
:local noiphostarray
:set noiphostarray [:toarray $noiphost]
:foreach host in=$noiphostarray do={
:log info "No-IP: Sending update for $host"
/tool fetch url=($url . "&hostname=$host") user=$noipuser password=$noippass mode=http dst-path=("no-ip_ddns_update-" . $host . ".txt")
:log info "No-IP: Host $host updated on No-IP with IP $currentIP"
/file print file=("no-ip_ddns_previousip.txt")
:delay 3
/file set contents="$currentIP" ("no-ip_ddns_previousip.txt")
}
} else={
:log info "No-IP: Previous IP $previousIP is equal to current IP, no update needed"
}
} else={
:log info "No-IP: $inetinterface is not currently running, so therefore will not update."
}

At me it stops at "Sending update for..."
Same script, checked and rechecked
 
Van9018
Long time Member
Long time Member
Posts: 558
Joined: Mon Jun 16, 2014 6:26 pm
Location: Canada - Abbotsford

Re: Really? No No-Ip working script?

Mon Jul 10, 2017 1:29 am

That looks like the script from the Mikrotik scripts page. It didn't for me neither, which is why I fell back on the one liner.
 
asd8tw
just joined
Posts: 12
Joined: Fri Nov 14, 2014 8:20 pm

Re: Really? No No-Ip working script?

Mon Aug 28, 2017 6:19 am

Are you in China?

I can not update NO-IP and Dynu ddns from China recently.
The script stops at

Code: Select all

/tool fetch address=dynupdate.no-ip.com src-path=("$url") mode=http user=$DDNSUser password=$DDNSPassword dst-path=("DDNS_no_ip")
But the same script runs well from other country out of China.
 
NerdMobile
just joined
Posts: 2
Joined: Fri Oct 02, 2015 5:31 pm

Re: Really? No No-Ip working script?

Mon Sep 11, 2017 6:05 pm

you could use the cloud feature from the routerboard and create a "cname" type on No-Ip, the cname will redirect your noip address to the rb cloud address and solve your problem
 
Diresta
just joined
Posts: 8
Joined: Mon Apr 30, 2018 2:22 am

Re: Really? No No-Ip working script?

Mon Apr 30, 2018 2:25 am

I had the same issue. Turned out it has to do with certain characters in your password. I regenerated a new password without symbols and the script worked right away after that.
Hope this can be of help to some of you
 
adnanius
just joined
Posts: 1
Joined: Thu Oct 25, 2018 1:06 pm

Re: Really? No No-Ip working script?

Thu Oct 25, 2018 1:15 pm

You don't need to use any script to update NOIP. You can use Mikrotik VPN for this:
1. In your Mikrotik click on IP>Cloud, check DDNS Enabled and Update time, then click Apply and Force update, after that you will see your Public IP and your DNS Name at Mikrotik.
2. Login to your NOIP account, on left meni click on My Services>DNS Records, click on Manage DNS Records, in section of your already created noip host click on Modify button, in Hostname Type choose DNS Alias (CNAME), in Target field enter your DNS Name from Mikrotik, click on Update Hostname and thats it ;)
 
rrieck
just joined
Posts: 1
Joined: Wed Jun 16, 2021 11:13 pm

Re: Really? No No-Ip working script?

Wed Jun 16, 2021 11:17 pm

Just found this information and worked for me without issue. Thanks. I had to switch from DynDNS to No-IP after I let my DynDNS subscription lapse and found they no longer have a free single site version.
 
martysm
just joined
Posts: 3
Joined: Sun Jul 10, 2022 9:36 pm

Re: Really? No No-Ip working script?

Sun Jul 10, 2022 9:38 pm

Worked for me, too.
TY

Who is online

Users browsing this forum: Bing [Bot] and 23 guests