/etc/hosts handling plugin for unbound

Petr Menšík pemensik at redhat.com
Thu Dec 22 01:07:13 UTC 2022


On 12/21/22 13:29, Daisuke HIGASHI 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?

Yes, reverse PTR record back to primary name would be nice. Domain 
suffix should not be necessary. /etc/hosts allows aliases, so you can 
have line like "10.0.0.1  primary.example.com primary". That would make 
primary.example.com a primary fully qualified domain name. And 
"primary." just an alias without matching PTR record. Either just 
address or even CNAME to primary.example.com.

It seems to me it could be a special implementation of Cache DB module. 
I admit I have never tried to use CacheDB module yet.

>
> 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?
>
-- 
Petr Menšík
Software Engineer, RHEL
Red Hat,https://www.redhat.com/
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nlnetlabs.nl/pipermail/unbound-users/attachments/20221222/3507c1cf/attachment-0001.htm>


More information about the Unbound-users mailing list