Page 1 of 1

Script or method to update dynamic DNS on failover interface

Posted: Fri Apr 15, 2016 11:54 am
by flameproof
I have a CCR1016 sitting in a remote location, connected via AirFiber to the internet backhaul. Since we get the occasional failure of the primary backhaul, I connected a 4G router to the CCR, so it can use this connection when the primary goes down.

What I now need is for a way to find out the public IP the 4G router has - the router itself doesn't offer any dynamic DNS methods built-in.

Since the setup is [CCR 10.100.0.10] -> [4G Router 10.100.0.1] -> [4G Router public x.x.x.x] the normal scripts don't work, as the public IP will never be assigned to one of the interfaces of the CCR.

I cannot also see a way to use /tool fetch as it will always try to go out of the default gateway, which is fine during failover, but I want it to run always, so I can have a way to remote into the CCR at any time over the 4G link.

Any ideas?

Re: Script or method to update dynamic DNS on failover interface

Posted: Fri Apr 15, 2016 1:24 pm
by Sob
I use IP->Cloud and simply add static route to cloud.mikrotik.com (81.198.87.240, 91.188.51.139) via backup connection's gateway. It's not perfect, because addresses can change, but you could create a script that would resolve the hostname periodically and update addresses.
The same idea could be applied to /tool fetch method, and it would be even easier if you used it with your server with static address.

Re: Script or method to update dynamic DNS on failover interface

Posted: Fri Apr 15, 2016 2:28 pm
by flameproof
Thanks for the idea - have tested it and it works, it's fine for what I need. Awesome!