Default domain for home network

tito farmatito at
Sun Feb 7 16:18:29 UTC 2021

On Sun, 7 Feb 2021 16:25:43 +0100
Koos Pol via Unbound-users <unbound-users at> wrote:

> 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

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


More information about the Unbound-users mailing list