:do {
[:resolve dnstest.subnet.net.id server=103.102.12.12];
:if ([/ip dns get server] != "103.102.12.12") do={
/ip dns set servers=103.102.12.12
:log warning "update to private DNS"
}
} on-error={
/ip dns set servers=1.1.1.1,8.8.8.8
:log warning "update to public DNS"
}
By Niammuddin Mz
December 24, 2022