access-control-view: 10.0.10.0/24 trustedaccess-control-view: 10.0.20.0/24 kidsaccess-control-view: 10.0.30.0/24 iotaccess-control-view: 10.0.40.0/24 dmzaccess-control-view: 10.0.50.0/24 camerasview: name: "trusted" local-zone: "beaker.ddnsgeek.com" transparent local-data: "opnsense.beaker.ddnsgeek.com A 10.0.10.1" local-data: "opnsense A 10.0.10.1" view-first: yesview: name: "kids" local-zone: "beaker.ddnsgeek.com" transparent local-data: "opnsense.beaker.ddnsgeek.com A 10.0.20.1" local-data: "opnsense A 10.0.20.1" view-first: yesview: name: "iot" local-zone: "beaker.ddnsgeek.com" transparent local-data: "opnsense.beaker.ddnsgeek.com A 10.0.30.1" local-data: "opnsense A 10.0.30.1" local-zone: "ntp.org" redirect local-data: "ntp.org A 10.0.30.1" view-first: yesview: name: "dmz" local-zone: "beaker.ddnsgeek.com" transparent local-data: "opnsense.beaker.ddnsgeek.com A 10.0.40.1" local-data: "opnsense A 10.0.40.1" view-first: yesview: name: "cameras" local-zone: "beaker.ddnsgeek.com" transparent local-data: "opnsense.beaker.ddnsgeek.com A 10.0.50.1" local-data: "opnsense A 10.0.50.1" local-zone: "ntp.org" redirect local-data: "ntp.org A 10.0.50.1" view-first: yes
server:access-control-view: 192.168.2.0/24 "vlan10"local-zone: "domain.url" redirectlocal-data: "domain.url 86400 IN A 192.168.1.1"view:name: "vlan10"local-zone: "localdomain" deny
Hello!Unbound now fails to start when trying to load custom access control views, something that worked well up to this point.Here's the content from the conf file that I drop in /usr/local/etc/unbound.opnsense.d, formatting as outlined in the unbound docs:Code: [Select]access-control-view: 10.0.10.0/24 trustedaccess-control-view: 10.0.20.0/24 kidsaccess-control-view: 10.0.30.0/24 iotaccess-control-view: 10.0.40.0/24 dmzaccess-control-view: 10.0.50.0/24 camerasview: name: "trusted" local-zone: "beaker.ddnsgeek.com" transparent local-data: "opnsense.beaker.ddnsgeek.com A 10.0.10.1" local-data: "opnsense A 10.0.10.1" view-first: yesview: name: "kids" local-zone: "beaker.ddnsgeek.com" transparent local-data: "opnsense.beaker.ddnsgeek.com A 10.0.20.1" local-data: "opnsense A 10.0.20.1" view-first: yesview: name: "iot" local-zone: "beaker.ddnsgeek.com" transparent local-data: "opnsense.beaker.ddnsgeek.com A 10.0.30.1" local-data: "opnsense A 10.0.30.1" local-zone: "ntp.org" redirect local-data: "ntp.org A 10.0.30.1" view-first: yesview: name: "dmz" local-zone: "beaker.ddnsgeek.com" transparent local-data: "opnsense.beaker.ddnsgeek.com A 10.0.40.1" local-data: "opnsense A 10.0.40.1" view-first: yesview: name: "cameras" local-zone: "beaker.ddnsgeek.com" transparent local-data: "opnsense.beaker.ddnsgeek.com A 10.0.50.1" local-data: "opnsense A 10.0.50.1" local-zone: "ntp.org" redirect local-data: "ntp.org A 10.0.50.1" view-first: yesAny ideas of why this is failing now would be greatly appreciated!Thanks!
Not sure why you need custom views here, a simple port forward rule would do just fine: Select all (V)LANs in scope, Proto UDP, Source Any Destination Any DPort 123 Redirect 127.0.0.1 Port 123You can then clone the rule and change NTP to DNS, adjust the proto to TCP/UDP
I also experienced a similar issue.Prior to 23.7, I was using a custom unbound conf with an access-control-view defined.Once I upgraded to 23.7, unbound would no longer start. Removing the access-control-view allows unbound to start. No idea what's causing it.Here's my redacted sample conf:Code: [Select]server:access-control-view: 192.168.2.0/24 "vlan10"local-zone: "domain.url" redirectlocal-data: "domain.url 86400 IN A 192.168.1.1"view:name: "vlan10"local-zone: "localdomain" denyI'm trying to prevent local dns lookups from vlan10
server:access-control-view: 192.168.2.0/24 vlan10local-zone: "domain.url" redirectlocal-data: "domain.url 86400 IN A 192.168.1.1"view: name: vlan10 local-zone: "localdomain" deny
It turns out my issue was a formatting issue. I got rid of the quotes around the view name and fixed the indents and now it starts with the following custom config. I guess the older version of unbound tolerated formatting issues but the newer version doesn't.