Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Aug 2016 11:33:33 -0700
From:      Yuri <yuri@rawbw.com>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Any way to cache large /etc/hosts files?
Message-ID:  <c9231456-2860-5455-a921-0ff60b9a2760@rawbw.com>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c9231456-2860-5455-a921-0ff60b9a2760>