Hi,
I need a script that updates my ip address on my mikrotik !
Im running a EoIP tunnel between 2 routerboards and have problem with dynamic ip so I need a script that updates my ip on both sides of the tunnel.
Hi,
I need a script that updates my ip address on my mikrotik !
Im running a EoIP tunnel between 2 routerboards and have problem with dynamic ip so I need a script that updates my ip on both sides of the tunnel.
I am not understanding your question - please rephrase
i think his ISP gives him a dynamic IP, and he needs a script that will change his EoIP configuration when the IP changes. He has two routers connected over EoIP
If that is the understanding then he will need a changeip.com account to dynamically track the changing IP address. Then he could use a script with a simple resolve statement to get the current IP of each side and use that to populatethe EOIP tunnel parameters.
Hi Normunds,
I use this topic to ask you a simple question… Is mikrotik planning to use dynamic DNS resolution ?
Because actually I’ve srcipted most of my routers to run dynamically…
For IPSEC I resolve the “proposal name field” to have dynamic policies and for peers, I’ve put the DNS in the beginning of the secret key (vd.wifx.net/adsf72345°§45blabla) ![]()
For EOIP and PPTP I perform a DNS resolution on the interface name:
# Mise à jour des IP Dynamiques des tunnels EOIP
:foreach i in=[/interface find type=eoip-tunnel] do={
:if ([/interface eoip get $i remote-address] = [:resolve [/interface eoip get $i name]]) do={:put false} else={/interface eoip set $i remote-address=[:resolve [/interface eoip get $i name]]}
}

Is there another solution ?
Thanks,
Julien
Hi abyss, Im looking for a script for the mikrotik that as same faunctionality as the one you pasted !!
Anyone help ???
Thanks
I think the script he posted does what you want - right?
In his case he put the (Dyn)DNS name of the remote end as “name” parameter in the EoIP interface.
The script checks if the ip address has changed and - if yes - reconfigures the EoIP tunnel.
Now the only thing left is to run this script regularly via the system scheduler.
Best regards,
Christian Meis
So Heinrich, paste the code in the source of a script, it’s fully functionnal, you just need to name your EOIP interface (Name) with the dns name, like “blabla.wifx.net”, and if you have EOIP tunnels that don’t have a DNS, just name it with the IP address directly… ![]()
Our dynamic dns is great for this. It would be even better to have MT be able to use DNS hostnames for endpoints … just simply resolve them each time they are dialed. This way if a tunnel drops because of an IP change the next retry causes a dns resolve and uses the correct IP automatically. A script is an excellent workaround - but would be a great enhancement to 3.0 to use dns or ips in those fields.
Sam