Community discussions

MikroTik App
 
vortex1
just joined
Topic Author
Posts: 20
Joined: Tue Sep 28, 2010 10:07 am

no ip script is not updating

Wed Jun 25, 2014 11:00 am

hello everyone. i am using a mikrotik 750 in bridge mode, where the mikrotik has the pppoe credentials.
i am using the script from http://wiki.mikrotik.com/wiki/Dynamic_D ... _No-IP_DNS to update the no ip domain. although the scripts it runs, it does not update.
as a test i am using a linux box in my lan to see if it can update the domain and it works correctly. the version of the software in mikrotik is 6.10
 
User avatar
semakka
Member Candidate
Member Candidate
Posts: 196
Joined: Mon Sep 11, 2006 10:59 am
Location: Moraira, Alicante, Spain
Contact:

Re: no ip script is not updating

Wed Jun 25, 2014 1:23 pm

you can use the cloud option on 6.15
 
vortex1
just joined
Topic Author
Posts: 20
Joined: Tue Sep 28, 2010 10:07 am

Re: no ip script is not updating

Wed Jun 25, 2014 7:11 pm

sorry what is the cloud option?
 
User avatar
patrikg
Member Candidate
Member Candidate
Posts: 262
Joined: Thu Feb 07, 2013 6:38 pm
Location: Stockholm, Sweden

Re: no ip script is not updating

Wed Jun 25, 2014 7:13 pm

 
jadu
Frequent Visitor
Frequent Visitor
Posts: 86
Joined: Sat Feb 05, 2011 9:22 am
Location: Bucharest - Constanta

Re: no ip script is not updating

Thu Jul 03, 2014 4:13 pm

I've this script running:

# Set needed variables
:local username "xxxx"
:local password "yyyy"
:local hostname "zzzz.noip.me"

:global dyndnsForce
:global previousIP

# print some debug info
#:log info ("pppoe2 - dyndns-update: username = $username")
#:log info ("pppoe2 - dyndns-update: password = $password")
#:log info ("pppoe2 - dyndns-update: hostname = $hostname")
#:log info ("pppoe2 - dyndns-update: previousIP = $previousIP")

#get ip address from interface
#:global ddnsip [/ip address get [/ip address find interface=pppoe-out2] address]
#:global ip [ :pick $ddnsip 0 [ :find $ddnsip "/" ] ]
#:log info $ip

# get the current IP address from the internet (in case of double-nat)
#/tool fetch mode=http address="checkip.dyndns.org" src-path="/" dst-path="/dyndns.checkip.html"
#:local result [/file get dyndns.checkip.html contents]
:global ddnsip [/ip address get [/ip address find interface=pppoe-out2] address]
:global currentIP [ :pick $ddnsip 0 [ :find $ddnsip "/" ] ]
#:log info $currentIP

# parse the current IP result
#:local resultLen [:len $result]
#:local startLoc [:find $result ": " -1]
#:set startLoc ($startLoc + 2)
#:local endLoc [:find $result "</body>" -1]
#:local currentIP [:pick $result $startLoc $endLoc]
#:log info "dyndns-update: currentIP = $currentIP"

# Determine if dyndns update is needed
# more dyndns updater request details available at http://www.dyndns.com/developers/specs/syntax.html
:if (($currentIP != $previousIP) || ($dyndnsForce = true)) do={
:set dyndnsForce false
:set previousIP $currentIP
/tool fetch user=$username password=$password mode=http address="dynupdate.no-ip.com" src-path="/nic/update?hostname=$hostname&myip=$currentIP" dst-path="/dyndns.txt"
:local result [/file get dyndns.txt contents]
:log info ("pppoe2 - dyndns-update: Dyndns update needed")
:log info ("pppoe2 - dyndns-update: Dyndns Update Result: ".$result)
:put ("Dyndns Update Result: ".$result)
} else={
:log info ("pppoe2 - dyndns-update: No dyndns update needed")
}

Who is online

Users browsing this forum: Amazon [Bot] and 72 guests