Community discussions

MikroTik App
 
nemke
Member Candidate
Member Candidate
Topic Author
Posts: 160
Joined: Thu Jul 31, 2014 2:52 am

dynDNS script which work

Wed Jan 27, 2016 2:51 am

Hello
Can someone please post script for dynDNS ip update which work.

I used one but after ROS upgrade to 6.30 ver she stop to work. I try many scripts from forum but no luck, nothing work...

My router is 6.33.5 ver, so some script which work, would be vary helpfull. I need script for double NAT (MT is behind ISP router).

Thank you
 
XeNeX
just joined
Posts: 3
Joined: Tue Nov 17, 2015 1:39 am

Re: dynDNS script which work

Sun Jan 31, 2016 7:05 pm

Working Good


:global ddnsuser "XXXXXXXX"
:global ddnspass "XXXXXXXX"
:global theinterface "pppoe-out1"
:global ddnshost XXXX.DYNDNS.TV
:global ipddns [:resolve $ddnshost];
:global ipfresh [ /ip address get [/ip address find interface=$theinterface ] address ]
:if ([ :typeof $ipfresh ] = nil ) do={
:log info ("DynDNS: No ip address on $theinterface .")
} else={
:for i from=( [:len $ipfresh] - 1) to=0 do={
:if ( [:pick $ipfresh $i] = "/") do={
:set ipfresh [:pick $ipfresh 0 $i];
}
}

:if ($ipddns != $ipfresh) do={
:log info ("DynDNS: IP-DynDNS = $ipddns")
:log info ("DynDNS: IP-Fresh = $ipfresh")
:log info "DynDNS: Update IP needed, Sending UPDATE...!"
:global str "/nic/update\?hostname=$ddnshost&myip=$ipfresh&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG"
/tool fetch address=members.dyndns.org src-path=$str mode=http user=$ddnsuser \
password=$ddnspass dst-path=("/DynDNS.".$ddnshost)
:delay 1
:global str [/file find name="DynDNS.$ddnshost"];
/file remove $str
:global ipddns $ipfresh
:log info "DynDNS: IP updated to $ipfresh!"
} else={
:log info "DynDNS: dont need changes";
}
}
 
nemke
Member Candidate
Member Candidate
Topic Author
Posts: 160
Joined: Thu Jul 31, 2014 2:52 am

Re: dynDNS script which work

Wed Feb 10, 2016 1:12 am

It doesn;t work...
It shows in log but in the end IP is not changed on dynDNS server

RB2011 6.34.1 ver
 
XeNeX
just joined
Posts: 3
Joined: Tue Nov 17, 2015 1:39 am

Re: dynDNS script which work

Wed Feb 10, 2016 2:19 pm

i have 5 router i configurated . working very good. maybe your config not true?
 
Paladium
just joined
Posts: 1
Joined: Sat Jan 23, 2016 1:54 am

Re: dynDNS script which work

Fri Apr 01, 2016 10:12 pm

The mistake is the

:global theinterface "pppoe-out1"

You have to set your WAN Port as the dyndns Interface.

Who is online

Users browsing this forum: No registered users and 28 guests