Community discussions

MikroTik App
 
fbone
just joined
Topic Author
Posts: 8
Joined: Mon May 20, 2013 9:18 pm

Has 6.1 broken my dyndns updater script?

Thu Jun 20, 2013 12:15 am

Hi guys,

I updated my RB750 to RouterOS 6.1 but it does not seem to update dyndns anymore.
Here is my (not mine the one I found and copied from various posts) script:

# Define User Variables
:global ddnsuser "USER"
:global ddnspass "PASS"
:global ddnshost "HOSTNAME"

# Define Global Variables
:global ddnsip
:global ddnslastip
:if ([ :typeof $ddnslastip ] = nil ) do={ :global ddnslastip "0" }

:global ddnsinterface pppoe
:global ddnssystem ("mt-" . [/system package get system version] )

# Define Local Variables
:local int

# Loop thru interfaces and look for ones containing
# default gateways without routing-marks
#:foreach int in=[/ip route find dst-address=0.0.0.0/0 active=yes ] do={
# :if ([:typeof [/ip route get $int routing-mark ]] != str ) do={
# :global ddnsinterface [/ip route get $int interface]
# }
#}

# Grab the current IP address on that interface.
:global ddnsip [ /ip address get [/ip address find interface=$ddnsinterface ] address ]

# Did we get an IP address to compare?
:if ([ :typeof $ddnsip ] = nil ) do={
:log info ("DynDNS: No ip address present on " . $ddnsinterface . ", please check.")
} else={
:if ($ddnsip != $ddnslastip) do={
:log info "DynDNS: Sending UPDATE!"
:local str "/nic/update?hostname=$ddnshost&myip=$ddnsip&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
:local str [/file find name="DynDNS.$ddnshost"];
/file remove $str
:global ddnslastip $ddnsip
}
}

Is there a problem with this script? Apologies for being a "copy-paster" noob thus I can't really tell what is wrong with the code (if there is something wrong).

Thank you in advance,
F
 
aldoir
newbie
Posts: 27
Joined: Fri Aug 24, 2012 4:19 am

Re: Has 6.1 broken my dyndns updater script?

Thu Jun 20, 2013 2:08 am

Don't know yours, but mine works fine and has far more features

http://forum.mikrotik.com/viewtopic.php?f=9&t=65013
 
fbone
just joined
Topic Author
Posts: 8
Joined: Mon May 20, 2013 9:18 pm

Re: Has 6.1 broken my dyndns updater script?

Thu Jun 20, 2013 5:01 pm

thanks a lot I will try it later on and post results.
 
fbone
just joined
Topic Author
Posts: 8
Joined: Mon May 20, 2013 9:18 pm

Re: Has 6.1 broken my dyndns updater script?

Tue Jun 25, 2013 11:35 pm

excellent thank you :)
 
gargola
newbie
Posts: 42
Joined: Tue Nov 20, 2012 12:05 am

Re: Has 6.1 broken my dyndns updater script?

Wed Aug 07, 2013 8:33 pm

Thank you aldoir your script works perfect on 6.2 :D
 
isitme
just joined
Posts: 1
Joined: Fri May 02, 2014 3:05 pm

Re: Has 6.1 broken my dyndns updater script?

Fri May 02, 2014 7:03 pm

Thanks a lot, very helpful!

Who is online

Users browsing this forum: anav, CHUPAPEE, faxxe, Google [Bot], GoogleOther [Bot], holla29 and 209 guests