Hello!
Is any possible to run script after DNS server resolve or update DNS cache? Run script every second and check DNS cache is CPU load expensive. Maybe is possibility to run script by Firewall event?
Answer is: There is no such funcionality.
Have you considered how CPU intensive would be script executing after each DNS resolve?
Nowadays each portal page loads resources from zylion addresses so one WWW page opening will trigger “waterfall” of scripts executions. meny services use “generic” DNS names (eg. NTP could use pl.pool.ntp.org or jp.pool.ntp.org name) to resolve current value which is served in “round robbin” manner to distribute load so each DNS name question returns different value = script trigger.
There are no DNS resolve high load. I mean that my script do high load because need very often check new DNS resolutions. I want add some domains and they subdomains to address list, so I read list of watching domain from file, than find them in DNS cache, and add to address list. If schedule it every second, cpu loaded additional 5%.
But if you open portalpage then it loads resources from many, many addresses (CDN networks) so one opened page triggers many DNS resolves which will trigger script executing.
Windows resolves to “update” hosts, NTP services look for time, printer’s drivers configured with DNS look for printer’s statuses, Windows searches the neighberhood.
There is huge amount of hidden traffic which led to DNS resolves … I know … you are asking for POSSBILITY to trigger script not to make this function mandatory. But even then if you bind/define such script then it will be triggered for every resolve … what CPU usage could be expected? Filters/regexp to trigger it for particular names … OMG … 110% of CPU for highly used DNS server
I understand. But I don’t need to execute script for every DNS query. It’s enough to run script when resolved IP stored in cache. In average it has on my router 500 entries.