MartineauUK / Unbound-Asuswrt-Merlin

Install and manage unbound (Recursive DNS) on Asus routers
Apache License 2.0
66 stars 13 forks source link

Problem with adding local-data statements #14

Closed sfatula closed 3 years ago

sfatula commented 3 years ago

If I add a single local-data statement to the unbound.conf file, all is well. If I add a second statement, perfectly legal, your script complains about a duplicate line and points to the line itself. local-data can be used to add local IP addresses to unbound, should be nothing wrong with using them. Should be simple to duplicate the issue. Add these lines to your unbound.conf:

local-zone: "local." static
local-data: "Win10.local. IN A 192.168.3.40"
local-data: "Test.local. IN A 192.168.3.18"

MartineauUK commented 3 years ago

unbound_manager.sh was designed for novices, and incorrect directives i.e. accidental duplicates in 'unbound.conf' caused issues, so in an attempt to protect novice users from themselves, the 'duplicates' check was implemented.

For 'local-data' directives, unbound_manager will automatically add an appropriate include '/opt/share/unbound/config/dnsmasq.conf.localhosts' directive to 'unbound.conf' if it exists.

However, I have uploaded unbound_manager.sh 'v3.22b' to the development branch for you to test.