Community discussions

MikroTik App
 
olivier2831
Member Candidate
Member Candidate
Topic Author
Posts: 296
Joined: Fri Sep 08, 2017 6:53 pm

Triggering DNS updates when WAN link fails or recovers

Fri Nov 23, 2018 2:13 pm

Hello,

I've read this [1] document and found it very interesting.
Though, I still have a remaining question:
which is the simplest way to trigger a DynDNS update script whenever a WAN link status changes (either becomes up or down) ?

Having updated DNS records would help to keep connections coming in when peers use DNS A records.

[1] https://wiki.mikrotik.com/wiki/Advanced ... _Scripting

Best regards
 
User avatar
Anumrak
Forum Guru
Forum Guru
Posts: 1174
Joined: Fri Jul 28, 2017 2:53 pm

Re: Triggering DNS updates when WAN link fails or recovers

Fri Nov 23, 2018 2:43 pm

Write a script which will compare your IP of dns record (dynamic address in address list) with address of your interface. If they're differs, run a ddns script. This advanced routing with routing marks too crowded.
 
User avatar
sebastia
Forum Guru
Forum Guru
Posts: 1782
Joined: Tue Oct 12, 2010 3:23 am
Location: Antwerp, BE

Re: Triggering DNS updates when WAN link fails or recovers

Fri Nov 23, 2018 3:07 pm

Hi

some options:
* if dhcpc is used, attach a script to client config, doing the update https://wiki.mikrotik.com/wiki/Manual:I ... pt_example
* configure dyn dns name (cname) to point to mikrotik cloud address (a record). The last one would be updated by mikrotik soft itself https://wiki.mikrotik.com/wiki/Manual:IP/Cloud#DDNS

edit: added links

Who is online

Users browsing this forum: Amazon [Bot], Bing [Bot], mkx, tangent, tryrtryrtryrt and 123 guests