Hi everybody,
It's been a looong time since i've written in a forum for infos thanks to the many guides online with answers for every thinkable topic, but here i am.
I'll explain briefly what lead me where i am now, i'll post some code hoping it's a stupid error ( no doubt about it).
TL;DR:
Unbound recursive DNS doesn't work but i did already disabled and deleted resolvconf.. why?
Short History:
After a bit of trouble installing and configuring piHole and a bit of time passed I found out about unbound and his DoT capability. I had to have it, i thought.
I had some trouble with my DoT config so i wondered about various networking .conf files - never a good thing to do - but after a couple days and lots of guides i did manage to understand enough to make it work with no problems at all.
( At this DoT step come to help the guides about the resolvconf_resolver which i disabled and removed )
After a week i found out about the recursive DNS possibilty: the real deal. I had to have it.
So backed up my pihole.conf and made a new one exactly a copy of The Guide
and.... here comes the problem :
It should work as it is but mine doesn't.
So here comes all the .conf files i think i touched since my first unbound install + unbound logs.
Unbound conf:
sudo grep -v '#\|^$' -R /etc/unbound/unbound.conf*
/etc/unbound/unbound.conf:include-toplevel: "/etc/unbound/unbound.conf.d/*.conf"
/etc/unbound/unbound.conf.d/root-auto-trust-anchor-file.conf:server:
/etc/unbound/unbound.conf.d/root-auto-trust-anchor-file.conf: auto-trust-anchor-file: "/var/lib/unbound/root.key"
/etc/unbound/unbound.conf.d/pihole.conf:server:
/etc/unbound/unbound.conf.d/pihole.conf: logfile: "/var/log/unbound/unbound.log"
/etc/unbound/unbound.conf.d/pihole.conf: verbosity: 3
/etc/unbound/unbound.conf.d/pihole.conf: interface: 127.0.0.1
/etc/unbound/unbound.conf.d/pihole.conf: port: 5335
/etc/unbound/unbound.conf.d/pihole.conf: do-ip4: yes
/etc/unbound/unbound.conf.d/pihole.conf: do-udp: yes
/etc/unbound/unbound.conf.d/pihole.conf: do-tcp: yes
/etc/unbound/unbound.conf.d/pihole.conf: do-ip6: no
/etc/unbound/unbound.conf.d/pihole.conf: prefer-ip6: no
/etc/unbound/unbound.conf.d/pihole.conf: harden-glue: yes
/etc/unbound/unbound.conf.d/pihole.conf: harden-dnssec-stripped: yes
/etc/unbound/unbound.conf.d/pihole.conf: use-caps-for-id: no
/etc/unbound/unbound.conf.d/pihole.conf: edns-buffer-size: 1472
/etc/unbound/unbound.conf.d/pihole.conf: prefetch: yes
/etc/unbound/unbound.conf.d/pihole.conf: num-threads: 1
/etc/unbound/unbound.conf.d/pihole.conf: so-rcvbuf: 1m
/etc/unbound/unbound.conf.d/pihole.conf: private-address: 192.168.0.0/16
/etc/unbound/unbound.conf.d/pihole.conf: private-address: 169.254.0.0/16
/etc/unbound/unbound.conf.d/pihole.conf: private-address: 172.16.0.0/12
/etc/unbound/unbound.conf.d/pihole.conf: private-address: 10.0.0.0/8
/etc/unbound/unbound.conf.d/pihole.conf: private-address: fd00::/8
/etc/unbound/unbound.conf.d/pihole.conf: private-address: fe80::/10
dhcpd.conf
sudo grep -v '#\|^$' -R /etc/dhcpcd.conf
hostname
clientid
persistent
option rapid_commit
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option interface_mtu
require dhcp_server_identifier
slaac private
interface eth0
static ip_address=192.168.1.3/24
static routers=192.168.1.1
static domain_name_servers=9.9.9.9, 1.1.1.1, 8.8.8.8;
Resolvconf.conf
sudo grep -v '#\|^$' -R /etc/resolvconf.conf
resolv_conf=/etc/resolv.conf
name_servers=9.9.9.9, 1.1.1.1, 8.8.8.8;
dnsmasq_resolv=/var/run/dnsmasq/resolv.conf
pdnsd_conf=/etc/pdnsd.conf
dig google.com
; <<>> DiG 9.16.33-Debian <<>> google.com @127.0.0.1 -p 5335
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 14784
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1472
;; QUESTION SECTION:
;google.com. IN A
;; Query time: 55 msec
;; SERVER: 127.0.0.1#5335(127.0.0.1)
;; WHEN: Mon Nov 14 21:51:29 CET 2022
;; MSG SIZE rcvd: 39
dig sigok
dig sigok.verteiltesysteme.net @127.0.0.1 -p 5335
; <<>> DiG 9.16.33-Debian <<>> sigok.verteiltesysteme.net @127.0.0.1 -p 5335
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 65196
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1472
;; QUESTION SECTION:
;sigok.verteiltesysteme.net. IN A
;; Query time: 51 msec
;; SERVER: 127.0.0.1#5335(127.0.0.1)
;; WHEN: Mon Nov 14 21:49:53 CET 2022
;; MSG SIZE rcvd: 55
nslookup
nslookup google.com
Server: 9.9.9.9
Address: 9.9.9.9#53
Non-authoritative answer:
Name: google.com
Address: 142.250.184.78
Name: google.com
Address: 2a00:1450:4002:405::200e
An extract from V2 Log unbound querying sigok and roots i think
[1668459476] unbound[10150:0] info: reply from <.> 202.12.27.33#53
[1668459476] unbound[10150:0] info: query response was THROWAWAY
[1668459476] unbound[10150:0] info: response for . NS IN
[1668459476] unbound[10150:0] info: reply from <.> 199.7.83.42#53
[1668459476] unbound[10150:0] info: query response was THROWAWAY
[1668459476] unbound[10150:0] info: response for . NS IN
[1668459476] unbound[10150:0] info: reply from <.> 198.97.190.53#53
[1668459476] unbound[10150:0] info: query response was THROWAWAY
[1668459476] unbound[10150:0] info: response for . NS IN
[1668459476] unbound[10150:0] info: reply from <.> 199.7.83.42#53
[1668459476] unbound[10150:0] info: query response was THROWAWAY
[1668459476] unbound[10150:0] info: response for . NS IN
[1668459476] unbound[10150:0] info: reply from <.> 192.203.230.10#53
[1668459476] unbound[10150:0] info: query response was THROWAWAY
[1668459476] unbound[10150:0] info: response for . NS IN
[1668459476] unbound[10150:0] info: reply from <.> 198.41.0.4#53
[1668459476] unbound[10150:0] info: query response was THROWAWAY
[1668459520] unbound[10150:0] info: resolving sigok.verteiltesysteme.net. A IN
[1668459520] unbound[10150:0] info: priming . IN NS
[1668459520] unbound[10150:0] info: response for . NS IN
[1668459520] unbound[10150:0] info: reply from <.> 192.112.36.4#53
[1668459520] unbound[10150:0] info: query response was THROWAWAY
[1668459520] unbound[10150:0] info: response for . NS IN
[1668459520] unbound[10150:0] info: reply from <.> 192.33.4.12#53
[1668459520] unbound[10150:0] info: query response was THROWAWAY
[1668459520] unbound[10150:0] info: response for . NS IN
[1668459520] unbound[10150:0] info: reply from <.> 202.12.27.33#53
[1668459520] unbound[10150:0] info: query response was THROWAWAY
[1668459520] unbound[10150:0] info: response for . NS IN
[1668459520] unbound[10150:0] info: reply from <.> 202.12.27.33#53
[1668459520] unbound[10150:0] info: query response was THROWAWAY
An extract of unbound Log V3 querying sigok etc.
1668459638] unbound[10199:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_reply
[1668459638] unbound[10199:0] info: iterator operate: query . NS IN
[1668459638] unbound[10199:0] info: response for . NS IN
[1668459638] unbound[10199:0] info: reply from <.> 198.41.0.4#53
[1668459638] unbound[10199:0] info: query response was THROWAWAY
[1668459638] unbound[10199:0] info: processQueryTargets: . NS IN
[1668459638] unbound[10199:0] info: sending query: . NS IN
[1668459638] unbound[10199:0] debug: sending to target: <.> 202.12.27.33#53
[1668459638] unbound[10199:0] debug: cache memory msg=66072 rrset=66072 infra=11669 val=66368 subnet=74504
[1668459638] unbound[10199:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_reply
[1668459638] unbound[10199:0] info: iterator operate: query . NS IN
[1668459638] unbound[10199:0] info: response for . NS IN
[1668459638] unbound[10199:0] info: reply from <.> 202.12.27.33#53
[1668459638] unbound[10199:0] info: query response was THROWAWAY
[1668459638] unbound[10199:0] info: processQueryTargets: . NS IN
[1668459638] unbound[10199:0] debug: request has exceeded the maximum number of sends with 33
[1668459638] unbound[10199:0] debug: return error response SERVFAIL
[1668459638] unbound[10199:0] debug: validator[module 1] operate: extstate:module_state_initial event:module_event_moddone
[1668459638] unbound[10199:0] info: validator operate: query . NS IN
[1668459638] unbound[10199:0] debug: subnet[module 0] operate: extstate:module_state_initial event:module_event_moddone
[1668459638] unbound[10199:0] info: subnet operate: query . NS IN
[1668459638] unbound[10199:0] debug: iterator[module 2] operate: extstate:module_wait_subquery event:module_event_pass
[1668459638] unbound[10199:0] info: iterator operate: query . DNSKEY IN
[1668459638] unbound[10199:0] info: processQueryTargets: . DNSKEY IN
[1668459638] unbound[10199:0] debug: Failed to get a delegation, giving up
[1668459638] unbound[10199:0] debug: return error response SERVFAIL
[1668459638] unbound[10199:0] debug: validator[module 1] operate: extstate:module_wait_module event:module_event_moddone
[1668459638] unbound[10199:0] info: validator operate: query . DNSKEY IN
[1668459638] unbound[10199:0] debug: subnet[module 0] operate: extstate:module_wait_module event:module_event_moddone
[1668459638] unbound[10199:0] info: subnet operate: query . DNSKEY IN
[1668459638] unbound[10199:0] debug: cache memory msg=66072 rrset=66072 infra=11669 val=66368 subnet=74504
[1668459641] unbound[10199:0] debug: subnet[module 0] operate: extstate:module_state_initial event:module_event_new
[1668459641] unbound[10199:0] info: subnet operate: query sigok.verteiltesysteme.net. A IN
[1668459641] unbound[10199:0] debug: validator[module 1] operate: extstate:module_state_initial event:module_event_pass
[1668459641] unbound[10199:0] info: validator operate: query sigok.verteiltesysteme.net. A IN
[1668459641] unbound[10199:0] debug: iterator[module 2] operate: extstate:module_state_initial event:module_event_pass
[1668459641] unbound[10199:0] info: resolving sigok.verteiltesysteme.net. A IN
[1668459641] unbound[10199:0] info: priming . IN NS
[1668459641] unbound[10199:0] debug: iterator[module 2] operate: extstate:module_state_initial event:module_event_pass
[1668459641] unbound[10199:0] info: iterator operate: query . NS IN
[1668459641] unbound[10199:0] info: processQueryTargets: . NS IN
[1668459641] unbound[10199:0] info: sending query: . NS IN
[1668459641] unbound[10199:0] debug: sending to target: <.> 199.9.14.201#53
[1668459641] unbound[10199:0] debug: cache memory msg=66072 rrset=66072 infra=11669 val=66368 subnet=74504
[1668459641] unbound[10199:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_reply
[1668459641] unbound[10199:0] info: iterator operate: query . NS IN
[1668459641] unbound[10199:0] info: response for . NS IN
[1668459641] unbound[10199:0] info: reply from <.> 199.9.14.201#53
[1668459641] unbound[10199:0] info: query response was THROWAWAY
[1668459641] unbound[10199:0] info: processQueryTargets: . NS IN