configuration problem when using include directive

張治東 zzd at jimny.me
Thu Dec 31 03:23:59 UTC 2020


Hello, 

I have setup unbound dns server for my home network. It can resolve the
dns query to my local computer when I write the dns info in unbound.conf
file, like the following setting.

    # include: "/usr/local/etc/unbound/z.lan.conf" 
    local-zone: "z.lan." static 
    local-data: "corebox.z.lan. IN A 192.168.1.150" 
    local-data-ptr: "192.168.1.150 corebox.z.lan" 

But it takes several minutes to be effective. 

When I write the dns info with include directive. It cannnot work.

    include: "/usr/local/etc/unbound/z.lan.conf" 
    # local-zone: "z.lan." static 
    # local-data: "corebox.z.lan. IN A 192.168.1.150" 
    # local-data-ptr: "192.168.1.150 corebox.z.lan" 

Here is what inside the z.lan.conf file.

local-zone: "z.lan." static 
local-data: "corebox.z.lan. IN A 192.168.1.150" 
local-data-ptr: "192.168.1.150 corebox.z.lan" 
local-data: "bt.z.lan. IN A 192.168.1.150" 
local-data-ptr: "192.168.1.150 bt.z.lan" 
local-data: "plex.z.lan. IN A 192.168.1.148" 
local-data-ptr: "192.168.1.148 plex.z.lan" 
local-data: "nas.z.lan. IN A 192.168.1.111" 
local-data-ptr: "192.168.1.111 nas.z.lan" 

Here is where the config files locate.

robot at corebox:/usr/local/etc/unbound $ ls -alh 
total 116 
drwxr-xr-x   2 unbound  wheel     512B Dec 30 10:04 . 
drwxr-xr-x  13 root     wheel     512B Nov 28 04:43 .. 
-rw-r--r--   1 unbound  wheel     3.2K Nov 12 00:54 named.root 
-rw-r--r--   1 unbound  wheel     758B Dec 30 10:04 root.key 
-rw-r--r--   1 root     wheel      44K Dec 30 00:00 unbound.conf 
-rw-r--r--   1 root     wheel      43K Nov 17 17:34 unbound.conf.sample 
-rw-r--r--   1 unbound  unbound     6B Dec  6 02:23 unbound.pid 
-rw-r--r--   1 root     wheel     384B Dec 30 00:05 z.lan.conf 

What is wrong with my configuration? Can someone help me?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nlnetlabs.nl/pipermail/unbound-users/attachments/20201231/cb2a3e1f/attachment.htm>


More information about the Unbound-users mailing list