Unbound running same port as Pi-hole

Expected Behaviour:

Fresh install of Pi-hole. Raspberry Pi 1B. Pi-hole working fine minus pi.hole/admin not working.

Actual Behaviour:

Unbound appears to be working running on the same port (53) despite me following the guides and telling it to run 5335

Debug Token:

[https://tricorder.pi-hole.net/UQIK1LdO/]

No... unbound is running on port 5335:

(unrelated lines removed to improve readability)

*** [ DIAGNOSING ]: Ports in use
[✓] udp:0.0.0.0:53 is in use by pihole-FTL
    udp:127.0.0.1:5335 is in use by unbound
[✓] udp:*:53 is in use by pihole-FTL
    tcp:127.0.0.1:5335 is in use by unbound
[✓] tcp:0.0.0.0:53 is in use by pihole-FTL
    tcp:127.0.0.1:8953 is in use by unbound
[✓] tcp:0.0.0.0:80 is in use by lighttpd
[✓] tcp:127.0.0.1:4711 is in use by pihole-FTL
[✓] tcp:[::1]:4711 is in use by pihole-FTL
[✓] tcp:[::]:53 is in use by pihole-FTL
[✓] tcp:[::]:80 is in use by lighttpd

Note:
the web interface is also working and running on port 80:

*** [ DIAGNOSING ]: Dashboard headers
[✓] Web interface X-Header: X-Pi-hole: The Pi-hole Web interface is working!

Where are you seeing this?

If the requesting client is not using Pi-hole for DNS, the domain pi.hole cannot be resolved to the IP of the Pi-hole.

From the command prompt or terminal on that client (and not via ssh to the Pi), what is the output of the following:

nslookup pi.hole

Server: pi.hole
Address: 192.168.1.152

DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
Name: pi.hole
Addresses: fe80::1d9f:ff8d:4c88:e570
192.168.1.152

My rationale for thinking this is because when I ran dig facebook.com

I received:

; <<>> DiG 9.16.44-Raspbian <<>> facebook.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 22503
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

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

;; Query time: 1049 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Dec 29 18:13:27 GMT 2023
;; MSG SIZE rcvd: 41

I had assumed that the #53 referred to the port number but I guess I'm incorrect?

A plain vanilla dig directed to an IP address without a port goes on port 53. Your Pi-hole is on port 53, and it answered.

Unseen to the requesting client, Pi-hole sends an unblocked and uncached request to its configured upstream server (in this case unbound) for resolution to an IP.

To test unbound directly from the host OS, you need to add a port:

dig facebook.com @127.0.0.1 -p 5335

...
;; ANSWER SECTION:
facebook.com.		270	IN	A	157.240.19.35

;; Query time: 0 msec
;; SERVER: 127.0.0.1#5335(127.0.0.1) (UDP)
;; WHEN: Fri Dec 29 12:51:48 CST 2023
;; MSG SIZE  rcvd: 57

If you do the following, it goes to Pi-hole on the host OS:

dig facebook.com @127.0.0.1

...
;; ANSWER SECTION:
facebook.com. 300 IN A 157.240.19.35

;; Query time: 51 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Fri Dec 29 12:51:18 CST 2023
;; MSG SIZE rcvd: 57

That works, I still can't get it to work when I set it as the DNS for the pi-hole though. Any ideas?

Exactly how/where did you set unbound as upstream DNS server?

Web interface - settings - DNS.

Untick both Cloudflare boxes, tick Custom 1 (IPv4) and fill in 127.0.0.1#5335. Click Save.

Like a lightswitch nothing resolves.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.