Bug 233239 - local_unbound fails with private_zone in conf.d/*.conf
Summary: local_unbound fails with private_zone in conf.d/*.conf
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.2-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2018-11-15 09:39 UTC by Petr Rehor
Modified: 2018-11-15 18:20 UTC (History)
0 users

See Also:


Attachments
Move control.conf to last line of unbound.conf (462 bytes, patch)
2018-11-15 09:39 UTC, Petr Rehor
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Rehor 2018-11-15 09:39:23 UTC
Created attachment 199255 [details]
Move control.conf to last line of unbound.conf

I have configuration file /etc/unbound/conf.d/rx.cz.conf:
private-domain:			"rx.cz."
local-zone:			"rx.cz." transparent
local-data: "charon.rx.cz.	IN A 192.168.1.1"

After 'service local_unboud setup' command I got /etc/unbound/unbound.conf:
# This file was generated by local-unbound-setup.
# Modifications will be overwritten.
server:
	username: unbound
	directory: /var/unbound
	chroot: /var/unbound
	pidfile: /var/run/local_unbound.pid
	auto-trust-anchor-file: /var/unbound/root.key

include: /var/unbound/forward.conf
include: /var/unbound/lan-zones.conf
include: /var/unbound/control.conf
include: /var/unbound/conf.d/*.conf

and 'service local_unbound restart' failed:
Stopping local_unbound.
Waiting for PIDS: 41617.
Starting local_unbound.
/var/unbound/conf.d/rx.cz.conf:1: error: syntax error
read /var/unbound/unbound.conf failed: 1 errors in configuration file
[1542273872] unbound[41639:0] fatal error: Could not read config file: /var/unbound/unbound.conf
/etc/rc.d/local_unbound: WARNING: failed to start local_unbound

When I move control.conf in /etc/unbound/unbound.conf to last line:
# This file was generated by local-unbound-setup.
# Modifications will be overwritten.
server:
        username: unbound
        directory: /var/unbound
        chroot: /var/unbound
        pidfile: /var/run/local_unbound.pid
        auto-trust-anchor-file: /var/unbound/root.key

include: /var/unbound/forward.conf
include: /var/unbound/lan-zones.conf
include: /var/unbound/conf.d/*.conf
include: /var/unbound/control.conf

local_unbound started without errors:
Starting local_unbound.
Waiting for nameserver to start... good