Discussion:
Any way to cache large /etc/hosts files?
(too old to reply)
Yuri
2016-08-05 18:33:33 UTC
Permalink
Some people suggest using pre-compiled lists of ad and malware domains
and block them on DNS level. (ex. https://github.com/StevenBlack/hosts)

The resulting hosts file is about 1MB. nscd(8) caches DNS results, but
it does this on name by name basis. Every new domain name request, even
within the same process, causes /etc/hosts file to be reread again.


Is there a way to cache /etc/hosts once and use it?


Yuri
Charles Swiger
2016-08-05 18:45:27 UTC
Permalink
Hi, Yuri--

Take a look into DNS RPZ, aka DNS blacklisting (the common use case):

https://dnsrpz.info <https://dnsrpz.info/>

Recent versions of ISC BIND support this....

Regards,
--
-Chuck
Some people suggest using pre-compiled lists of ad and malware domains and block them on DNS level. (ex. https://github.com/StevenBlack/hosts)
The resulting hosts file is about 1MB. nscd(8) caches DNS results, but it does this on name by name basis. Every new domain name request, even within the same process, causes /etc/hosts file to be reread again.
Is there a way to cache /etc/hosts once and use it?
Yuri
_______________________________________________
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
Loading...