Community discussions

MikroTik App
 
tecnoarte
newbie
Topic Author
Posts: 29
Joined: Mon Apr 21, 2008 3:48 pm

ChangeIP after RouterOS 4.10 !!!

Tue Jul 27, 2010 6:10 am

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
 
User avatar
hilton
Long time Member
Long time Member
Posts: 634
Joined: Thu Sep 07, 2006 5:12 pm
Location: Jozi (aka Johannesburg), South Africa

Re: ChangeIP after RouterOS 4.10 !!!

Thu Jul 29, 2010 5:46 pm

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.
 
changeip
Forum Guru
Forum Guru
Posts: 3833
Joined: Fri May 28, 2004 5:22 pm

Re: ChangeIP after RouterOS 4.10 !!!

Thu Jul 29, 2010 7:15 pm

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
 
User avatar
hilton
Long time Member
Long time Member
Posts: 634
Joined: Thu Sep 07, 2006 5:12 pm
Location: Jozi (aka Johannesburg), South Africa

Re: ChangeIP after RouterOS 4.10 !!!

Thu Jul 29, 2010 7:22 pm

Sam, I will test it for you.

Thanks.
 
tecnoarte
newbie
Topic Author
Posts: 29
Joined: Mon Apr 21, 2008 3:48 pm

Re: ChangeIP after RouterOS 4.10 !!!

Sat Jul 31, 2010 7:33 pm

Hilton, thanks for the script, but for me it did not work in version 4.10 !

Sam, anything new ?

thanks...

Alexandre
 
changeip
Forum Guru
Forum Guru
Posts: 3833
Joined: Fri May 28, 2004 5:22 pm

Re: ChangeIP after RouterOS 4.10 !!!

Sat Jul 31, 2010 7:37 pm

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
 
tecnoarte
newbie
Topic Author
Posts: 29
Joined: Mon Apr 21, 2008 3:48 pm

Re: ChangeIP after RouterOS 4.10 !!!

Sat Jul 31, 2010 8:52 pm

Perfect Sam, the error was in the name of the interface !!! Now is working perfectly...

Thanks for the support Sam and Hilton

Alexandre