Community discussions

MUM Europe 2020
just joined
Topic Author
Posts: 1
Joined: Wed Aug 22, 2018 6:31 am

help me for scheduler command / script to update DNS ips

Sat Sep 01, 2018 3:12 pm

Hi All,
I am an end user of Mikrotik.
I need to have a command / script which runs at scheduled intervals to retrieve DNS IPs from OpenNIC url and update my DNS IPs accordingly.
I have succeeded in getting ip file.
/tool fetch url="" dst-path=dns.txt;
/ip dns set server=[/file get [/file find name=dns.txt] contents];
But, as I am getting each ip with separate line so, routeros is not accepting the ips as it only accepts comma separated ips.
Can anybody help me to convert this text file contents to convert it in acceptable format.
I don't know scripting and this may help others too.

Who is online

Users browsing this forum: Google [Bot] and 20 guests