Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 07 Aug 2016 19:59:36 +0200
From:      =?UTF-8?Q?Sol=C3=A8ne_Rapenne?= <solene@perso.pw>
To:        Yuri <yuri@rawbw.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>, owner-freebsd-questions@freebsd.org
Subject:   Re: Any way to cache large /etc/hosts files?
Message-ID:  <960897ab9ef32afef1b38047bf284f3a@mail.zplay.eu>
In-Reply-To: <c9231456-2860-5455-a921-0ff60b9a2760@rawbw.com>
References:  <c9231456-2860-5455-a921-0ff60b9a2760@rawbw.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Le 2016-08-05 20:33, Yuri a écrit :
> 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
> 
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to 
> "freebsd-questions-unsubscribe@freebsd.org"


Hello,

Maybe adsuck would be a good tool for what you want.

It original purpose it to use lists of blacklisted hosts to redirect 
them to 127.0.0.1 by using the dns system and stop ads in browing. 
adsuck uses files with the same syntax as /etc/hosts and then if it 
doesn't know the name if will pass the request to your DNS resolver.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?960897ab9ef32afef1b38047bf284f3a>