# Unbound not working with pi-hole

**URL:** <https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431>\
**Category:** Troubleshooting\
**Created:** [25 September 2022 23:28 UTC](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431 "2022-09-25T23:28:29Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [26 September 2022 10:19 UTC](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431/21 "2022-09-26T10:19:43Z")

</div>

> [@WarHawk](#):
>
> Ah so his Unbound service isn’t starting

the service is starting but Unbound is not able to connect to root DNS server

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [26 September 2022 10:21 UTC](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431/22 "2022-09-26T10:21:01Z")

</div>

> [@xMike](#):
>
> ```auto
> root@Pi-hole:~# journalctl -u unbound. Service
> Failed to add match 'Service': Invalid argument
> 
> ```

Ahhh typo. Try following

```auto
journalctl -u unbound.service

```

---

<div class="post-metadata">

**Author:** ![xMike](https://dietpi.com/forum/user_avatar/dietpi.com/xmike/32/2685_2.png) [@xMike](https://dietpi.com/forum/u/xMike)\
**Post date:** [26 September 2022 10:21 UTC](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431/23 "2022-09-26T10:21:38Z")

</div>

```auto
root@Pi-hole:~# journalctl -u unbound.service
-- Journal begins at Mon 2022-09-26 03:16:57 PDT, ends at Mon 2022-09-26 03:20:01 PDT. --
Sep 26 03:16:58 Pi-hole systemd[1]: Starting Unbound DNS server...
Sep 26 03:16:58 Pi-hole unbound[409]: [409:0] notice: init module 0: subnet
Sep 26 03:16:58 Pi-hole unbound[409]: [409:0] notice: init module 1: validator
Sep 26 03:16:58 Pi-hole unbound[409]: [409:0] notice: init module 2: iterator
Sep 26 03:16:59 Pi-hole systemd[1]: Started Unbound DNS server.
Sep 26 03:16:59 Pi-hole unbound[409]: [409:0] info: start of service (unbound 1.13.1).
Sep 26 03:16:59 Pi-hole unbound[409]: [409:0] info: resolving . DNSKEY IN
Sep 26 03:16:59 Pi-hole unbound[409]: [409:0] info: priming . IN NS
Sep 26 03:17:02 Pi-hole unbound[409]: [409:0] info: Capsforid: timeouts, starting fallback
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: response for . NS IN
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: reply from <.> 198.97.190.53#53
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: Capsforid: reply is equal. go to next fallback
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: response for . NS IN
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: reply from <.> 192.112.36.4#53
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: Capsforid: reply is equal. go to next fallback
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: response for . NS IN
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: reply from <.> 198.41.0.4#53
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: Capsforid: reply is equal. go to next fallback
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: response for . NS IN
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: reply from <.> 198.97.190.53#53
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: Capsforid: reply is equal. go to next fallback
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: response for . NS IN
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: reply from <.> 199.7.83.42#53
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: Capsforid: reply is equal. go to next fallback
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: response for . NS IN
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: reply from <.> 199.7.83.42#53
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: Capsforid: reply is equal. go to next fallback
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: response for . NS IN
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: reply from <.> 199.9.14.201#53
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: Capsforid: reply is equal. go to next fallback
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: response for . NS IN
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: reply from <.> 192.112.36.4#53
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: Capsforid: reply is equal. go to next fallback
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: response for . NS IN
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: reply from <.> 199.9.14.201#53
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: Capsforid: reply is equal. go to next fallback
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: response for . NS IN
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: reply from <.> 192.33.4.12#53
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: Capsforid: reply is equal. go to next fallback

```

---

<div class="post-metadata">

**Author:** ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)\
**Post date:** [26 September 2022 10:22 UTC](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431/24 "2022-09-26T10:22:50Z")

</div>

There is also another unbound instance running on oort 8953, which is not default behavior?;

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [26 September 2022 10:25 UTC](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431/25 "2022-09-26T10:25:21Z")

</div>

> [@Jappe](#):
>
> There is also another unbound instance running on oort 8953, which is not default behavior?

This is fine and expected.

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [26 September 2022 10:28 UTC](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431/26 "2022-09-26T10:28:41Z")

</div>

at least we changed from

```auto
Sep 26 02:01:21 Pi-hole unbound[1074]: [1074:0] info: query response REC_LAME: recursive but not authoritative server
Sep 26 02:01:21 Pi-hole unbound[1074]: [1074:0] info: mark as REC_LAME

```

to

```auto
Sep 26 03:17:07 Pi-hole unbound[409]: [409:0] info: Capsforid: reply is equal. go to next fallback

```

Still unbound seems to have challanges with connecting to the root DNS server.  
🤔

I guess `dig` is still failing?

```auto
dig @127.0.0.1 -p 5335 google.com

```

---

<div class="post-metadata">

**Author:** ![xMike](https://dietpi.com/forum/user_avatar/dietpi.com/xmike/32/2685_2.png) [@xMike](https://dietpi.com/forum/u/xMike)\
**Post date:** [26 September 2022 10:30 UTC](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431/27 "2022-09-26T10:30:13Z")

</div>

oh man, i can’t make heads or tails with all this output, lol  
way past my head, haha  
props for everyone else who can understand it

```auto
root@Pi-hole:~# dig @127.0.0.1 -p 5335 google.com

; <<>> DiG 9.16.33-Debian <<>> @127.0.0.1 -p 5335 google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 32743
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;google.com. IN A

;; Query time: 500 msec
;; SERVER: 127.0.0.1#5335(127.0.0.1)
;; WHEN: Mon Sep 26 03:29:09 PDT 2022
;; MSG SIZE rcvd: 39

```

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [26 September 2022 10:35 UTC](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431/28 "2022-09-26T10:35:00Z")

</div>

> [@xMike](#):
>
> ```auto
> `;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 32743`
> 
> ```

That’s the important line as **status=SERVFAIL**

It has something to do with the `Capsforid: timeouts` message on the log. I need to check where this is coming from.

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [26 September 2022 10:54 UTC](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431/29 "2022-09-26T10:54:29Z")

</div>

let’s try to increase the log level once more. This should enable the debug mode. 🙄

```auto
G_CONFIG_INJECT ' verbosity:' ' verbosity:3' /etc/unbound/unbound.conf.d/dietpi.conf

```

Reboot the system and check the logs

```auto
journalctl -u unbound.service

```

---

<div class="post-metadata">

**Author:** ![xMike](https://dietpi.com/forum/user_avatar/dietpi.com/xmike/32/2685_2.png) [@xMike](https://dietpi.com/forum/u/xMike)\
**Post date:** [26 September 2022 10:58 UTC](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431/30 "2022-09-26T10:58:02Z")

</div>

i believe in you 🙏🏻

```auto
root@Pi-hole:~# journalctl -u unbound.service
-- Journal begins at Mon 2022-09-26 03:55:03 PDT, ends at Mon 2022-09-26 03:56:26 PDT. --
Sep 26 03:55:04 Pi-hole systemd[1]: Starting Unbound DNS server...
Sep 26 03:55:04 Pi-hole unbound[409]: [1664189704] unbound[409:0] debug: switching log to syslog
Sep 26 03:55:04 Pi-hole unbound[409]: [409:0] debug: chdir to /etc/unbound
Sep 26 03:55:04 Pi-hole unbound[409]: [409:0] debug: drop user privileges, run as unbound
Sep 26 03:55:04 Pi-hole unbound[409]: [409:0] debug: module config: "subnetcache validator iterator"
Sep 26 03:55:04 Pi-hole unbound[409]: [409:0] notice: init module 0: subnet
Sep 26 03:55:04 Pi-hole unbound[409]: [409:0] debug: subnet: option registered (8)
Sep 26 03:55:04 Pi-hole unbound[409]: [409:0] notice: init module 1: validator
Sep 26 03:55:04 Pi-hole unbound[409]: [409:0] notice: init module 2: iterator
Sep 26 03:55:04 Pi-hole unbound[409]: [409:0] debug: target fetch policy for level 0 is 3
Sep 26 03:55:04 Pi-hole unbound[409]: [409:0] debug: target fetch policy for level 1 is 2
Sep 26 03:55:04 Pi-hole unbound[409]: [409:0] debug: target fetch policy for level 2 is 1
Sep 26 03:55:04 Pi-hole unbound[409]: [409:0] debug: target fetch policy for level 3 is 0
Sep 26 03:55:04 Pi-hole unbound[409]: [409:0] debug: target fetch policy for level 4 is 0
Sep 26 03:55:05 Pi-hole unbound[409]: [409:0] debug: Reading root hints from /var/lib/unbound/root.hints
Sep 26 03:55:05 Pi-hole unbound[409]: [409:0] info: DelegationPoint<.>: 13 names (0 missing), 26 addrs (0 result, 26 avail) parentNS
Sep 26 03:55:05 Pi-hole unbound[409]: [409:0] debug: cache memory msg=66072 rrset=66072 infra=7808 val=66368 subnet=74504
Sep 26 03:55:05 Pi-hole systemd[1]: Started Unbound DNS server.
Sep 26 03:55:05 Pi-hole unbound[409]: [409:0] info: start of service (unbound 1.13.1).
Sep 26 03:55:05 Pi-hole unbound[409]: [409:0] debug: subnet[module 0] operate: extstate:module_state_initial event:module_event_new
Sep 26 03:55:05 Pi-hole unbound[409]: [409:0] info: subnet operate: query . DNSKEY IN
Sep 26 03:55:05 Pi-hole unbound[409]: [409:0] debug: validator[module 1] operate: extstate:module_state_initial event:module_event_pass
Sep 26 03:55:05 Pi-hole unbound[409]: [409:0] info: validator operate: query . DNSKEY IN
Sep 26 03:55:05 Pi-hole unbound[409]: [409:0] debug: iterator[module 2] operate: extstate:module_state_initial event:module_event_pass
Sep 26 03:55:05 Pi-hole unbound[409]: [409:0] info: resolving . DNSKEY IN
Sep 26 03:55:05 Pi-hole unbound[409]: [409:0] info: priming . IN NS
Sep 26 03:55:05 Pi-hole unbound[409]: [409:0] debug: iterator[module 2] operate: extstate:module_state_initial event:module_event_pass
Sep 26 03:55:05 Pi-hole unbound[409]: [409:0] info: iterator operate: query . NS IN
Sep 26 03:55:05 Pi-hole unbound[409]: [409:0] info: processQueryTargets: . NS IN
Sep 26 03:55:05 Pi-hole unbound[409]: [409:0] info: sending query: . NS IN
Sep 26 03:55:05 Pi-hole unbound[409]: [409:0] debug: sending to target: <.> 202.12.27.33#53
Sep 26 03:55:05 Pi-hole unbound[409]: [409:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_noreply
Sep 26 03:55:05 Pi-hole unbound[409]: [409:0] info: iterator operate: query . NS IN
Sep 26 03:55:05 Pi-hole unbound[409]: [409:0] info: processQueryTargets: . NS IN
Sep 26 03:55:05 Pi-hole unbound[409]: [409:0] info: sending query: . NS IN
Sep 26 03:55:05 Pi-hole unbound[409]: [409:0] debug: sending to target: <.> 199.9.14.201#53
Sep 26 03:55:05 Pi-hole unbound[409]: [409:0] debug: cache memory msg=66072 rrset=66072 infra=8547 val=66368 subnet=74504
Sep 26 03:55:06 Pi-hole unbound[409]: [409:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_noreply
Sep 26 03:55:06 Pi-hole unbound[409]: [409:0] info: iterator operate: query . NS IN
Sep 26 03:55:06 Pi-hole unbound[409]: [409:0] info: processQueryTargets: . NS IN
Sep 26 03:55:06 Pi-hole unbound[409]: [409:0] info: sending query: . NS IN
Sep 26 03:55:06 Pi-hole unbound[409]: [409:0] debug: sending to target: <.> 202.12.27.33#53
Sep 26 03:55:06 Pi-hole unbound[409]: [409:0] debug: cache memory msg=66072 rrset=66072 infra=8547 val=66368 subnet=74504
Sep 26 03:55:08 Pi-hole unbound[409]: [409:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_noreply
Sep 26 03:55:08 Pi-hole unbound[409]: [409:0] info: iterator operate: query . NS IN
Sep 26 03:55:08 Pi-hole unbound[409]: [409:0] info: processQueryTargets: . NS IN
Sep 26 03:55:08 Pi-hole unbound[409]: [409:0] info: sending query: . NS IN
Sep 26 03:55:08 Pi-hole unbound[409]: [409:0] debug: sending to target: <.> 192.58.128.30#53
Sep 26 03:55:08 Pi-hole unbound[409]: [409:0] debug: cache memory msg=66072 rrset=66072 infra=8844 val=66368 subnet=74504
Sep 26 03:55:08 Pi-hole unbound[409]: [409:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_noreply
Sep 26 03:55:08 Pi-hole unbound[409]: [409:0] info: iterator operate: query . NS IN
Sep 26 03:55:08 Pi-hole unbound[409]: [409:0] info: Capsforid: timeouts, starting fallback
Sep 26 03:55:08 Pi-hole unbound[409]: [409:0] info: processQueryTargets: . NS IN
Sep 26 03:55:08 Pi-hole unbound[409]: [409:0] info: sending query: . NS IN
Sep 26 03:55:08 Pi-hole unbound[409]: [409:0] debug: sending to target: <.> 192.58.128.30#53
Sep 26 03:55:08 Pi-hole unbound[409]: [409:0] debug: cache memory msg=66072 rrset=66072 infra=8844 val=66368 subnet=74504
Sep 26 03:55:10 Pi-hole unbound[409]: [409:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_noreply
Sep 26 03:55:10 Pi-hole unbound[409]: [409:0] info: iterator operate: query . NS IN
Sep 26 03:55:10 Pi-hole unbound[409]: [409:0] info: processQueryTargets: . NS IN
Sep 26 03:55:10 Pi-hole unbound[409]: [409:0] info: sending query: . NS IN
Sep 26 03:55:10 Pi-hole unbound[409]: [409:0] debug: sending to target: <.> 199.7.91.13#53
Sep 26 03:55:10 Pi-hole unbound[409]: [409:0] debug: cache memory msg=66072 rrset=66072 infra=9141 val=66368 subnet=74504
Sep 26 03:55:11 Pi-hole unbound[409]: [409:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_noreply
Sep 26 03:55:11 Pi-hole unbound[409]: [409:0] info: iterator operate: query . NS IN
Sep 26 03:55:11 Pi-hole unbound[409]: [409:0] info: processQueryTargets: . NS IN
Sep 26 03:55:11 Pi-hole unbound[409]: [409:0] info: sending query: . NS IN
Sep 26 03:55:11 Pi-hole unbound[409]: [409:0] debug: sending to target: <.> 192.112.36.4#53
Sep 26 03:55:11 Pi-hole unbound[409]: [409:0] debug: cache memory msg=66072 rrset=66072 infra=9438 val=66368 subnet=74504
Sep 26 03:55:11 Pi-hole unbound[409]: [409:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_noreply
Sep 26 03:55:11 Pi-hole unbound[409]: [409:0] info: iterator operate: query . NS IN
Sep 26 03:55:11 Pi-hole unbound[409]: [409:0] info: processQueryTargets: . NS IN
Sep 26 03:55:11 Pi-hole unbound[409]: [409:0] info: sending query: . NS IN
Sep 26 03:55:11 Pi-hole unbound[409]: [409:0] debug: sending to target: <.> 192.112.36.4#53
Sep 26 03:55:11 Pi-hole unbound[409]: [409:0] debug: cache memory msg=66072 rrset=66072 infra=9438 val=66368 subnet=74504
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_reply
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: iterator operate: query . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: response for . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: reply from <.> 192.112.36.4#53
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: Capsforid: reply is equal. go to next fallback
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: processQueryTargets: . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: sending query: . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: sending to target: <.> 192.5.5.241#53
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: cache memory msg=66072 rrset=66072 infra=9735 val=66368 subnet=74504
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_reply
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: iterator operate: query . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: response for . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: reply from <.> 192.5.5.241#53
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: Capsforid: reply is equal. go to next fallback
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: processQueryTargets: . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: sending query: . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: sending to target: <.> 192.5.5.241#53
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: cache memory msg=66072 rrset=66072 infra=9735 val=66368 subnet=74504
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_reply
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: iterator operate: query . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: response for . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: reply from <.> 192.5.5.241#53
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: Capsforid: reply is equal. go to next fallback
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: processQueryTargets: . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: sending query: . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: sending to target: <.> 192.33.4.12#53
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: cache memory msg=66072 rrset=66072 infra=10032 val=66368 subnet=74504
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_reply
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: iterator operate: query . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: response for . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: reply from <.> 192.33.4.12#53
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: Capsforid: reply is equal. go to next fallback
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: processQueryTargets: . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: sending query: . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: sending to target: <.> 192.5.5.241#53
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: cache memory msg=66072 rrset=66072 infra=10032 val=66368 subnet=74504
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_reply
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: iterator operate: query . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: response for . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: reply from <.> 192.5.5.241#53
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: Capsforid: reply is equal. go to next fallback
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: processQueryTargets: . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: sending query: . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: sending to target: <.> 192.5.5.241#53
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: cache memory msg=66072 rrset=66072 infra=10032 val=66368 subnet=74504
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_reply
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: iterator operate: query . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: response for . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: reply from <.> 192.5.5.241#53
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: Capsforid: reply is equal. go to next fallback
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: processQueryTargets: . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: sending query: . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: sending to target: <.> 198.97.190.53#53
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: cache memory msg=66072 rrset=66072 infra=10329 val=66368 subnet=74504
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_reply
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: iterator operate: query . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: response for . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: reply from <.> 198.97.190.53#53
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: Capsforid: reply is equal. go to next fallback
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: processQueryTargets: . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: sending query: . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: sending to target: <.> 192.36.148.17#53
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: cache memory msg=66072 rrset=66072 infra=10626 val=66368 subnet=74504
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_reply
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: iterator operate: query . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: response for . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: reply from <.> 192.36.148.17#53
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: Capsforid: reply is equal. go to next fallback
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: processQueryTargets: . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: sending query: . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: sending to target: <.> 192.5.5.241#53
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: cache memory msg=66072 rrset=66072 infra=10626 val=66368 subnet=74504
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_reply
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: iterator operate: query . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: response for . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: reply from <.> 192.5.5.241#53
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: Capsforid: reply is equal. go to next fallback
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: processQueryTargets: . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: sending query: . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: sending to target: <.> 198.41.0.4#53
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: cache memory msg=66072 rrset=66072 infra=10923 val=66368 subnet=74504
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_reply
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: iterator operate: query . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: response for . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: reply from <.> 198.41.0.4#53
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: Capsforid: reply is equal. go to next fallback
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: processQueryTargets: . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: sending query: . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: sending to target: <.> 198.41.0.4#53
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: cache memory msg=66072 rrset=66072 infra=10923 val=66368 subnet=74504
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_reply
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: iterator operate: query . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: response for . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: reply from <.> 198.41.0.4#53
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: Capsforid: reply is equal. go to next fallback
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: processQueryTargets: . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: request . has exceeded the maximum number of glue fetches 17 to a single delegation point
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: return error response SERVFAIL
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: validator[module 1] operate: extstate:module_state_initial event:module_event_moddone
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: validator operate: query . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: subnet[module 0] operate: extstate:module_state_initial event:module_event_moddone
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: subnet operate: query . NS IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: iterator[module 2] operate: extstate:module_wait_subquery event:module_event_pass
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: iterator operate: query . DNSKEY IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: processQueryTargets: . DNSKEY IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: Failed to get a delegation, giving up
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: return error response SERVFAIL
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: validator[module 1] operate: extstate:module_wait_module event:module_event_moddone
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: validator operate: query . DNSKEY IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: subnet[module 0] operate: extstate:module_wait_module event:module_event_moddone
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] info: subnet operate: query . DNSKEY IN
Sep 26 03:55:13 Pi-hole unbound[409]: [409:0] debug: cache memory msg=66072 rrset=66072 infra=10923 val=66368 subnet=74504

```

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [26 September 2022 11:52 UTC](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431/31 "2022-09-26T11:52:34Z")

</div>

sorry for digging around but I’m still not sure why Unbound has issues to connect to root DNS servers.

Let’s try to increase debug level to the highest level 5.

```auto
G_CONFIG_INJECT ' verbosity:' ' verbosity:5' /etc/unbound/unbound.conf.d/dietpi.conf

```

Reboot and check logs again

```auto
journalctl -u unbound.service

```

and we could check the root DNS server directly if they are reachable

```auto
dig @202.12.27.33 google.com

```

---

<div class="post-metadata">

**Author:** ![xMike](https://dietpi.com/forum/user_avatar/dietpi.com/xmike/32/2685_2.png) [@xMike](https://dietpi.com/forum/u/xMike)\
**Post date:** [26 September 2022 11:59 UTC](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431/32 "2022-09-26T11:59:51Z")

</div>

oh no, **thank you** for helping 🙇🏻‍♂️

the log was too big for me to paste it all, but the dig command worked

> Body is limited to 32000 characters; you entered 184035

```auto
root@Pi-hole:~# dig @202.12.27.33 google.com

; <<>> DiG 9.16.33-Debian <<>> @202.12.27.33 google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45073
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;google.com. IN A

;; ANSWER SECTION:
google.com. 258 IN A 142.251.211.238

;; Query time: 12 msec
;; SERVER: 202.12.27.33#53(202.12.27.33)
;; WHEN: Mon Sep 26 04:54:24 PDT 2022
;; MSG SIZE rcvd: 55

```

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [26 September 2022 12:40 UTC](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431/33 "2022-09-26T12:40:11Z")

</div>

> [@xMike](#):
>
> the log was too big for me to paste it all, but the dig command worked

you could export the `journalctl` into a log file and attach it to the post

```auto
journalctl -u unbound.service > /tmp/log.txt

```

---

<div class="post-metadata">

**Author:** ![xMike](https://dietpi.com/forum/user_avatar/dietpi.com/xmike/32/2685_2.png) [@xMike](https://dietpi.com/forum/u/xMike)\
**Post date:** [26 September 2022 12:44 UTC](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431/34 "2022-09-26T12:44:10Z")

</div>

log attached!  
i’m going to sleep now, 5:44 am 😅  
thanks for all your help so far! hopefully we can figure this out 🙂  
[log.txt](https://dietpi.com/forum/uploads/short-url/u6yJzLaNRJQZLeXSpeABkZJu8Vw.txt) (189.1 KB)

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [26 September 2022 21:33 UTC](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431/35 "2022-09-26T21:33:05Z")

</div>

Honestly I’m still not sure what the issue is exactly. There are quite some time outs on the debug log. Something seems to block communication betweem Unbound and root DNS server.

Maybe @MichaIng or @trendy have an idea.

For testing, we could try to adjust DNS forward zone to point to Cloudflare and Quad9. Let’s see if this might be working. At least we could check the general functionality.

```auto
cat << '_EOF_' > /etc/unbound/unbound.conf.d/dietpi-forward.conf
# Adding own forward-zone
forward-zone:
name: "."
## Cloudflare
forward-addr: 1.1.1.1@53#cloudflare-dns.com
forward-addr: 1.0.0.1@53#cloudflare-dns.com
## Quad9
forward-addr: 9.9.9.9@53#dns.quad9.net
forward-addr: 149.112.112.112@53#dns.quad9.net
_EOF_

```

restart service and perform a test

```auto
systemctl restart unbound
dig @127.0.0.1 -p 5335 google.com

```

---

<div class="post-metadata">

**Author:** ![xMike](https://dietpi.com/forum/user_avatar/dietpi.com/xmike/32/2685_2.png) [@xMike](https://dietpi.com/forum/u/xMike)\
**Post date:** [26 September 2022 22:06 UTC](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431/36 "2022-09-26T22:06:16Z")

</div>

damn, stumping us both

```auto
root@Pi-hole:~# cat << '_EOF_' > /etc/unbound/unbound.conf.d/dietpi-forward.conf
> # Adding own forward-zone
112@53#> forward-zone:
> name: "."
> ## Cloudflare
> forward-addr: 1.1.1.1@53#cloudflare-dns.com
> forward-addr: 1.0.0.1@53#cloudflare-dns.com
> ## Quad9
> forward-addr: 9.9.9.9@53#dns.quad9.net
> forward-addr: 149.112.112.112@53#dns.quad9.net
> _EOF_
root@Pi-hole:~# systemctl restart unbound
root@Pi-hole:~# dig @127.0.0.1 -p 5335 google.com

; <<>> DiG 9.16.33-Debian <<>> @127.0.0.1 -p 5335 google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 39645
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;google.com. IN A

;; Query time: 16 msec
;; SERVER: 127.0.0.1#5335(127.0.0.1)
;; WHEN: Mon Sep 26 15:04:29 PDT 2022
;; MSG SIZE rcvd: 39

```

---

<div class="post-metadata">

**Author:** ![WarHawk](https://dietpi.com/forum/user_avatar/dietpi.com/warhawk/32/21_2.png) [@WarHawk](https://dietpi.com/forum/u/WarHawk)\
**Post date:** [27 September 2022 02:57 UTC](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431/37 "2022-09-27T02:57:31Z")

</div>

worse comes to worse, might also try uninstalling the dietpi package…and manually install/configure (kinda defeats the purpose of using the easy to install package system though)

I know when I put it on a debian 11 VM in PROXMOX on my network as a test…I followed this walkthru and it worked like a champ with NO issues…1st try  
[unbound - Pi-hole documentation](https://docs.pi-hole.net/guides/dns/unbound/)

---

<div class="post-metadata">

**Author:** ![xMike](https://dietpi.com/forum/user_avatar/dietpi.com/xmike/32/2685_2.png) [@xMike](https://dietpi.com/forum/u/xMike)\
**Post date:** [27 September 2022 02:59 UTC](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431/38 "2022-09-27T02:59:18Z")

</div>

ah, yeah. i actually installed it on a vps (ubuntu 20.04) earlier which worked fine with the same documentation, but for some reason i couldn’t get it to work with dietpi

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [27 September 2022 06:46 UTC](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431/39 "2022-09-27T06:46:46Z")

</div>

> [@xMike](#):
>
> i actually installed it on a vps

I guess the system was located outside of your network at a Cloud Server provider? Correct? This makes a difference as network environment is completely different.

---

<div class="post-metadata">

**Author:** ![xMike](https://dietpi.com/forum/user_avatar/dietpi.com/xmike/32/2685_2.png) [@xMike](https://dietpi.com/forum/u/xMike)\
**Post date:** [27 September 2022 06:59 UTC](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431/40 "2022-09-27T06:59:28Z")

</div>

correct! so it’s not a fair comparison for dietpi since there’s different variables at play

[Previous page](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431.md?page=1)

[Next page](https://dietpi.com/forum/t/unbound-not-working-with-pi-hole/14431.md?page=3)
