/etc/hosts handling plugin for unbound

tito farmatito at tiscali.it
Wed Dec 21 13:56:14 UTC 2022

On Wed, 21 Dec 2022 21:29:44 +0900
Daisuke HIGASHI via Unbound-users <unbound-users at lists.nlnetlabs.nl> wrote:

>   Unbound has some function to load local data dynamically such as
> "local-data" configuration or RPZ, or modifying DNS response with Python
> script.  So if somebody (including me) wants to load hosts file to Unbound,
> they will just write a script that _fulfills their requirements_.
>   I understand that ability to loading /etc/hosts as local data (by just
> giving /etc/hosts path) is useful for some people, but I don't know how the
> function should be and fulfills many users' requirements. Needs to add PTR
> records? Needs to add some domain suffix?
> Petr Menšík via Unbound-users <unbound-users at lists.nlnetlabs.nl>:
> > Hi everyone,
> >
> > Is there some plugin for automatically watching /etc/hosts file for
> > changes and loading them as a local data?
> >

attached you will find a script I use to update my /etc/hosts ads block list
and add it to unbound as local-data on debian/devuan. Hope it could help
as inspiration (yes I know it is rather ugly but it worked reliably for years
for me as crontab script).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: adaway.sh
Type: application/x-shellscript
Size: 6093 bytes
Desc: not available
URL: <http://lists.nlnetlabs.nl/pipermail/unbound-users/attachments/20221221/6acf9728/attachment.bin>

More information about the Unbound-users mailing list