I experienced the issue of AdGuard being unable to startup, as unbound already bound to Port 53 (LAN)
The motivation is that AdGuard serves all local DNS-requests, including for .localdomain, but those are forwarded to unbound.
So this is my cfg for the AdGuard Settings > DNS Settings > Upstream DNS servers
The necessary interface:port-binding that works4me is this:
however; in order to achieve this, there is no way in the GUI to specify these port-binding requirements.
I had to override it like this:
The only sideeffect is: a GUI Banner for unbound:
Furthermore it was necessary to start unbound like this:
I wonder ... did I miss something, or is this AdGuard integration so unusual that it's not readily supported in OPNsense's GUI?
Is there a 'clean' way to achieve the above?
The motivation is that AdGuard serves all local DNS-requests, including for .localdomain, but those are forwarded to unbound.
So this is my cfg for the AdGuard Settings > DNS Settings > Upstream DNS servers
Code Select
https://dns.quad9.net/dns-query
https://dns.google/dns-query
https://dns.cloudflare.com/dns-query
[/localdomain/]127.0.0.1:53The necessary interface:port-binding that works4me is this:
Code Select
root@OPNsense:~ # sockstat -4 -l | grep :53
root AdGuardHom 69756 76 udp4 192.168.0.1:53 *:*
unbound unbound 3107 10 tcp4 127.0.0.1:53 *:*
[...]
root@OPNsense:~ # sockstat -4 -l | grep :853
unbound unbound 3107 5 tcp4 127.0.0.1:853 *:*
unbound unbound 3107 7 tcp4 192.168.0.1:853 *:*
[...]however; in order to achieve this, there is no way in the GUI to specify these port-binding requirements.
I had to override it like this:
Code Select
root@OPNsense:/usr/local/etc/unbound.opnsense.d # cat 10-localbind.conf
server:
interface-automatic: no
interface: 127.0.0.1@53
interface: 127.0.0.1@853The only sideeffect is: a GUI Banner for unbound:
Code Select
The configuration contains manual overwrites, these may interfere with the settings configured here.Furthermore it was necessary to start unbound like this:
Code Select
root@OPNsense:/usr/local/etc/rc.syshook.d/start # cat 50-unbound
#!/bin/sh
# Delay + Start Unbound DNS service if not already running
sleep 3
if ! service unbound onestatus >/dev/null 2>&1; then
logger -t unbound "Starting Unbound (delayed boot fix)..."
service unbound start
fiI wonder ... did I miss something, or is this AdGuard integration so unusual that it's not readily supported in OPNsense's GUI?
Is there a 'clean' way to achieve the above?
"