Hi All
I'm using pihole since ~1,5 year and so far no issues. Actually I love it Thank you Pihole team
There is something I like to understand and this is where I ask on help. Maybe my understanding is wrong from the beginning.
Pihole + Unbound is installed on a DietPi (DietPi v9.8.0 - Debian GNU/Linux 12 (bookworm)) VM and in theory all devices on the network are forced to use PiHole as every request directed against port 53 outside the LAN is blocked on the firewall except from pihole. Use PiHole or die - simple as that.
From the default PiHole list under settings in the web gui I have enabled
Quad9 (filtered, DNSSEC) 9.9.9.9 + 142.112.112.112
and added unbound as the upstream DNS Server 127.0.0.1#5335
I would think that pihole needs to access is 9.9.9.9 + 142.112.112.112 and that's it. I assume that unbound will also query those 2 directly. But I see in the firewall logs that a bunch (~200+ in 10 minutes) of other addresses are queried as well (all of them port 53) from the pihole server and most of them belong to *root-servers.net (that's fine) but also ns3.apnic.net, 1e100.net (google junk), etc are queried directly. Currently all of those are blocked. Checked all of them and all of them are some legitime name servers.
I'm still able to access all websites/services as it seems and feel no drawback. (yes feel )
And
dig pi-hole.net @127.0.0.1 -p 5335
works fine as I have added the above 2 to: /etc/unbound/unbound.conf.d/forwarders.conf
If I'm not mistaken unbounds primary role is some sort of cache so that pihole does not need to get to the external providers for every request. Faster, more private due to cache, etc.
But what might be the reason for so many outgoing requests to other IPs than the defines ones? Is this coming from PiHole, Unbound, or maybe something else installed on the same VM (DietPi)? Where could I check?
Thanks!
Settings on the PiHole VM:
cat /etc/resolv.conf
(empty - only the default comments)
cat /etc/hosts
127.0.0.1 localhost
cat /etc/unbound/unbound.conf
include-toplevel: "/etc/unbound/unbound.conf.d/*.conf"
cat /etc/unbound/unbound.conf.d/pi-hole.conf
server:
logfile: "/var/log/unbound/unbound.log" -> does not exist, is that normal?
log-time-ascii: yes
verbosity: 1
interface: 127.0.0.1
port: 5335
do-ip4: yes
do-udp: yes
do-tcp: yes
do-ip6: no
prefer-ip6: no
harden-glue: yes
harden-dnssec-stripped: yes
use-caps-for-id: no
edns-buffer-size: 1232
prefetch: yes
num-threads: 1
so-rcvbuf: 1m
private-address: 192.168.0.0/16
private-address: 169.254.0.0/16
private-address: 172.16.0.0/12
private-address: 10.0.0.0/8
As suggested by: unbound - Pi-hole documentation
systemctl status unbound-resolvconf.service
○ unbound-resolvconf.service - Unbound asyncronous resolvconf update helper
Loaded: loaded (/lib/systemd/system/unbound-resolvconf.service; disabled; preset: enabled)
Active: inactive (dead)
systemctl status unbound.service
● unbound.service - Unbound DNS server
Loaded: loaded (/lib/systemd/system/unbound.service; enabled; preset: enabled)
Active: active (running) since Sat 2024-11-09 23:17:22 CET; 6min ago
Docs: man:unbound(8)
Process: 606 ExecStartPre=/usr/libexec/unbound-helper chroot_setup (code=exited, status=0/SUCCESS)
Process: 637 ExecStartPre=/usr/libexec/unbound-helper root_trust_anchor_update (code=exited, status=0/SUCCESS)
Main PID: 642 (unbound)
Tasks: 1 (limit: 1092)
Memory: 16.5M
CPU: 47ms
CGroup: /system.slice/unbound.service
└─642 /usr/sbin/unbound -d -p