Page 1 of 1
ChangeIP after RouterOS 4.10 !!!
Posted: Tue Jul 27, 2010 6:10 am
by tecnoarte
After upgrading to RouterOS 4.10, DDNS ChangeIP my script stopped working ... follow the guidelines of
http://wiki.mikrotik.com/wiki/Dynamic_D ... angeIP.com site, but did not work! Has anyone experienced this problem?
Alexandre
Re: ChangeIP after RouterOS 4.10 !!!
Posted: Thu Jul 29, 2010 5:46 pm
by hilton
I'm using this script on 4.11 and it's working. Not too sure how different it is from the one Sam posted.
:global ddnsuser "your_changeip_account"
:global ddnspass "your_changeip_password"
:global ddnshost "your_changeip_ddns_name"
:global ddnsip
:global ddnslastip [:tostr [:resolve $ddnshost] ]
:if ([ :typeof $ddnslastip ] = nil ) do={ :global ddnslastip "0" }
:global ddnsinterface "your_interface_name"
:global ddnssystem ("mt-" . [/system package get system version] )
:local int
:local ddnsipfn [ /ip address get [/ip address find interface=$ddnsinterface ] address ]
:global ddnsip [:pick $ddnsipfn 0 [:find $ddnsipfn "/"]]
:if ([ :typeof $ddnsip ] = nil ) do={
:log info ("DDNS: No ip address present on " . $ddnsinterface . ", please check.")
} else={
:if ($ddnsip != $ddnslastip) do={
:log info "DDNS: Sending ADSL UPDATE!"
:log info [ :put [/tool dns-update name=$ddnshost address=$ddnsip key-name=$ddnsuser key=$ddnspass ] ]
:global ddnslastip $ddnsip
} else={
:log info "DDNS: No ADSL update required."
}
}
Hope it helps.
Re: ChangeIP after RouterOS 4.10 !!!
Posted: Thu Jul 29, 2010 7:15 pm
by changeip
I am preparing a beta of the new remote ip detection script. This might be better for some and worse for others, depending on your environment. I will post it in the next day or so for some to test.
Sam
Re: ChangeIP after RouterOS 4.10 !!!
Posted: Thu Jul 29, 2010 7:22 pm
by hilton
Sam, I will test it for you.
Thanks.
Re: ChangeIP after RouterOS 4.10 !!!
Posted: Sat Jul 31, 2010 7:33 pm
by tecnoarte
Hilton, thanks for the script, but for me it did not work in version 4.10 !
Sam, anything new ?
thanks...
Alexandre
Re: ChangeIP after RouterOS 4.10 !!!
Posted: Sat Jul 31, 2010 7:37 pm
by changeip
Still working on it. I have given it to one user that really needs it to beta test with and I will try to get it on the forums monday.
Try this in the terminal:
Enter an initial curly brace to start an enclosed script:
{
and then paste in your existing script...
and then finally hit the closing curly brace:
}
and see whats RED or errors out. You should be able to tell where the error is in the script this way. Maybe its an interface name with special characters or dashes or something and we just need to put quotes around something.
Sam
Re: ChangeIP after RouterOS 4.10 !!!
Posted: Sat Jul 31, 2010 8:52 pm
by tecnoarte
Perfect Sam, the error was in the name of the interface !!! Now is working perfectly...
Thanks for the support Sam and Hilton
Alexandre