<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <br>
    <br>
    <div class="moz-cite-prefix">Op 07-02-2021 om 17:18 schreef tito:<br>
    </div>
    <blockquote type="cite" cite="mid:20210207171829.469244fa@devuan">
      <pre class="moz-quote-pre" wrap="">On Sun, 7 Feb 2021 16:25:43 +0100
Koos Pol via Unbound-users <a class="moz-txt-link-rfc2396E" href="mailto:unbound-users@lists.nlnetlabs.nl"><unbound-users@lists.nlnetlabs.nl></a> wrote:

</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">Background: I have Unbound running on OPNSense as my home network DNS 
server.

Question: Is there a setting to have Unbound resolve plain host names 
(*cookie*) against my default LAN domain (*sesame.street*)?

At home, my laptops use /etc/resolv.conf, so everything without a
domain name (*cookie*), automatically gets the local LAN domain for
free (*sesame.street*). Now everything resolves just fine: 
*cookie.sesame.street.**
*
But I'm running into this issue with the Android phones, which seem
to strictly query host names (without the local domain name).
(Ofcourse, they are on DHCP so to do have the local domain name.) As
a result, Unbound doesn't resolve those queries, but forwards
*cookie* to the root servers. Which is kinda silly.

Thanks!
Koos
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
Hi,
something like this should work:

1) bind the ip of laptops and android phones to their wifi MAC address
    so that they get handed out always the same ip and your
     internal unbound as dns server

2) set all boxes with wired connections to static ip addresses

3) add:    include: "/var/lib/unbound/local-data.conf"  to your
      unbound.conf file with something like (use your ip):

local-data: "cookie A 192.168.XXX.YYY"
local-data: "cookie.sesame.street A 192.168.XXX.YYY"

4) restart unbound

Ciao,
Tito



</pre>
    </blockquote>
    <br>
    Thanks for the suggestion. But that's basically getting back to
    fixed IP addresses, albeit centralized. And you need to maintain it.
    I'm hoping for an /etc/resolv kind of behavioral switch.<br>
  </body>
</html>