Community discussions

MikroTik App
 
markrudling
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 51
Joined: Tue Aug 15, 2006 6:28 pm

Changed to ChangeIP but need to keep Dyndns name!

Sun Mar 15, 2009 10:49 am

Hi

I have got the changeip script working, so all good. however i now need to keep my dyndns name, as to many clients are already configured for that name. Im not running http services, so i need all ports to be directly redirected. Any ideas?

Also, is it possible to mod the script to work with a specific pppoe connection, my MT needs to dial 4

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

Re: Changed to ChangeIP but need to keep Dyndns name!

Sun Mar 15, 2009 7:14 pm

you can update your dyndns hostname to become a cname of the changeip one. that way it is just an alias.

we can modify that script to work on a particular interface specifically... email us directly and we will work with you to get what you need. support at changeip dot com.

Sam
 
knects
just joined
Posts: 24
Joined: Tue Dec 02, 2008 1:49 pm

Re: Changed to ChangeIP but need to keep Dyndns name!

Wed Apr 01, 2009 8:27 pm

Are you saying that you can modify this so that it will update the address of an interface that I specify? I am using ECMP routing on 2 PPPoE connections. One is static and has dns set for it. The 2nd connection changes anytime the interface drops. I would like to setup a changip host and have the script update the host with the DHCP address from the 2nd wan link.
 
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: Changed to ChangeIP but need to keep Dyndns name!

Thu Apr 02, 2009 4:19 pm

Use this script;
:global ddnsuser "your_account_name"
:global ddnspass "your_account_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_mikrotik_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 UPDATE!"
:log info [ :put [/tool dns-update name=$ddnshost address=$ddnsip key-name=$ddnsuser key=$ddnspass ] ]
:global ddnslastip $ddnsip

} else={
:log info "DDNS: No update required."
}

}