Page 1 of 1

Why doesn't work: script dns cache - address list?

Posted: Sat Sep 20, 2008 9:37 am
by yudigadget
{
:foreach k in=[/ip dns cache find] do={
:if ([:find [/ip dns cache get $k name] "res.sriwijaya-air-online.com"] > 0) do={
:log info ("sriwijaya: " . [/ip dns cache get $k name] . " (ip address " . [/ip dns cache get $k address] . ")")
/ip firewall address-list add address=[/ip dns cache get $k address] list=list_ticketing disabled=no comment="res.sriwijaya-air-online.com"
}
}
}

what that script doesn't work.. but if i change it with google.com, klikbca.com then it works.. :( why?

Re: Why doesn't work: script dns cache - address list?

Posted: Mon Sep 22, 2008 9:34 am
by mrz
Maybe "res.sriwijaya-air-online.com" is not showing up in "/ip dns cache". Try "/ip dns cache all" it will show all entries including CNAME and NS