Expected Behaviour:
Pihole + unbound to resolve the DNS queries but it always ends with SERVER not reachable.
Raspberry PI4B will freshly updated for system and all other stuffs I have.
Actual Behaviour:
I have configured my router with two below data paths:
- Direct to ISP
- Through a VPN running at router level
Using a policy based routing, I am forwarding some IP's device only through the VPN. For DNS I have a twin Pihole configurations:
- PI_1 in the ISP route with unbound working perfectly. All devices using ISP are pointing to PI_1 as DNS
- PI_2 in the VPN route with the issue with unbound. All devices using are pointing to PI_2 as DNS
- PI_2 IP is well routed through the VPN
Issue:
-unbound cannot contact any server when activated in PI_2 while passing through the VPN
-unbound can contact servers when activated in PI_2 while passing through the ISP
-when using an external resolver in PI_2, while passing through the VPN, I can get back correctly the IPs targeted
-when unbound is running PI_2 while passing through the VPN, Pihole is well sending to the unbound server all requests
So I should be missing something huge but I have no idea what. My conclusion is no external requests are being processed by PI_2 if passing through VPN + inbound, while PI_2 can well make requests directly through the VPN (tested with the browser)
Debug Token:
Below the log from unbound while tunneled through the VPN:
1612942720] unbound[1901:0] info: validator operate: query apple.com. A IN
[1612942720] unbound[1901:0] debug: iterator[module 2] operate: extstate:module_state_initial event:module_event_pass
[1612942720] unbound[1901:0] info: resolving apple.com. A IN
[1612942720] unbound[1901:0] info: priming . IN NS
[1612942720] unbound[1901:0] debug: iterator[module 2] operate: extstate:module_state_initial event:module_event_pass
[1612942720] unbound[1901:0] info: iterator operate: query . NS IN
[1612942720] unbound[1901:0] info: processQueryTargets: . NS IN
[1612942720] unbound[1901:0] info: sending query: . NS IN
[1612942720] unbound[1901:0] debug: sending to target: <.> 2001:500:1::53#53
[1612942720] unbound[1901:0] info: error sending query to auth server 2001:500:1::53 port 53
[1612942720] unbound[1901:0] info: processQueryTargets: . NS IN
[1612942720] unbound[1901:0] info: sending query: . NS IN
[1612942720] unbound[1901:0] debug: sending to target: <.> 2001:500:a8::e#53
[1612942720] unbound[1901:0] info: error sending query to auth server 2001:500:a8::e port 53
[1612942720] unbound[1901:0] info: processQueryTargets: . NS IN
[1612942720] unbound[1901:0] info: sending query: . NS IN
[1612942720] unbound[1901:0] debug: sending to target: <.> 2001:503:c27::2:30#53
[1612942720] unbound[1901:0] info: error sending query to auth server 2001:503:c27::2:30 port 53
[1612942720] unbound[1901:0] info: processQueryTargets: . NS IN
[1612942720] unbound[1901:0] info: sending query: . NS IN
[1612942720] unbound[1901:0] debug: sending to target: <.> 2001:500:200::b#53
[1612942720] unbound[1901:0] info: error sending query to auth server 2001:500:200::b port 53
[1612942720] unbound[1901:0] info: processQueryTargets: . NS IN
[1612942720] unbound[1901:0] info: sending query: . NS IN
[1612942720] unbound[1901:0] debug: sending to target: <.> 2001:500:2f::f#53
[1612942720] unbound[1901:0] info: error sending query to auth server 2001:500:2f::f port 53
[1612942720] unbound[1901:0] info: processQueryTargets: . NS IN
Below the output of systemctl status unbound.service
● unbound.service - Unbound DNS server
Loaded: loaded (/lib/systemd/system/unbound.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2021-02-10 15:38:21 CST; 3h 4min ago
Docs: man:unbound(8)
Process: 1888 ExecStartPre=/usr/lib/unbound/package-helper chroot_setup (code=exited, status=0/SUCCESS)
Process: 1891 ExecStartPre=/usr/lib/unbound/package-helper root_trust_anchor_update (code=exited, status=0/SUCCESS)
Main PID: 1901 (unbound)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/unbound.service
└─1901 /usr/sbin/unbound -d
Feb 10 15:37:30 Pi-Toy systemd[1]: Starting Unbound DNS server...
Feb 10 15:38:21 Pi-Toy package-helper[1891]: /var/lib/unbound/root.key has content
Feb 10 15:38:21 Pi-Toy package-helper[1891]: fail: the anchor is NOT ok and could not be fixed
Feb 10 15:38:21 Pi-Toy unbound[1901]: [1612942701] unbound[1901:0] debug: chdir to /etc/unbound
Feb 10 15:38:21 Pi-Toy unbound[1901]: [1612942701] unbound[1901:0] debug: drop user privileges, run as unbound
Feb 10 15:38:21 Pi-Toy unbound[1901]: [1612942701] unbound[1901:0] debug: switching log to /var/log/unbound/unbound.log
Feb 10 15:38:21 Pi-Toy systemd[1]: Started Unbound DNS server.