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 https://api.opennicproject.org/geoip/?res=4&bare&adm=4 and update my DNS IPs accordingly.
I have succeeded in getting ip file.
/tool fetch url="https://api.opennicproject.org/geoip/?res=4&bare&adm=4" 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.
Thanks.