Hi, there
I've installed pi-hole on my raspberry pi and used it as an ad-blocker for a while. I would like to also to benefit from it as a local DNS to use human-readable domains and not IP addresses, but I can't figure out what is wrong. I set up it via docker container with network_mode: "host"
, and added a DNS record in pi-hole gui (pi.local
-> to 192.168.50.83
(IP of raspberry pi itself)), but still no effect
Expected Behaviour:
I can access pi not only via IP address, but also via domain name
Actual Behaviour:
In Google Chrome (macOS) I get DNS_PROBE_FINISHED_NXDOMAIN
error while trying to navigate to http://pi.local/
The result of nslookup pi.local
from my desktop is
Server: 192.168.50.83
Address: 192.168.50.83#53
Name: pi.local
Address: 192.168.50.83
The result of dig pi.local
from my desktop is
; <<>> DiG 9.10.6 <<>> pi.local
;; global options: +cmd
;; Got answer:
;; WARNING: .local is reserved for Multicast DNS
;; You are currently testing what happens when an mDNS query is leaked to DNS
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43131
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;pi.local. IN A
;; ANSWER SECTION:
pi.local. 0 IN A 192.168.50.83
;; Query time: 2 msec
;; SERVER: 192.168.50.83#53(192.168.50.83)
;; WHEN: Sat May 14 12:52:24 IDT 2022
;; MSG SIZE rcvd: 53
The result of ping pi.local
from my desktop is:
ping: cannot resolve pi.local: Unknown host
Debug Token:
https://tricorder.pi-hole.net/WYFrU2OX/
To confirm, the desktop that you are testing the URI from is macOS?
Can you please do the same tests for the domain pi.hole
?
yes, macOS. DNS_PROBE_FINISHED_NXDOMAIN
error while trying to navigate to http://pi.hole/
The result of nslookup pi.hole
Server: 192.168.50.83
Address: 192.168.50.83#53
Name: pi.hole
Address: 0.0.0.0
The result of dig pi.hole
; <<>> DiG 9.10.6 <<>> pi.hole
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39474
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;pi.hole. IN A
;; ANSWER SECTION:
pi.hole. 0 IN A 0.0.0.0
;; Query time: 2 msec
;; SERVER: 192.168.50.83#53(192.168.50.83)
;; WHEN: Sat May 14 22:56:56 IDT 2022
;; MSG SIZE rcvd: 52
The result of ping pi.hole
PING pi.hole (0.0.0.0): 56 data bytes
ping: sendto: Socket is not connected
ping: sendto: Socket is not connected
Request timeout for icmp_seq 0
ping: sendto: Socket is not connected
Request timeout for icmp_seq 1
ping: sendto: Socket is not connected
Request timeout for icmp_seq 2
ping: sendto: Socket is not connected
Request timeout for icmp_seq 3
ping: sendto: Socket is not connected
Request timeout for icmp_seq 4
ping: sendto: Socket is not connected
Request timeout for icmp_seq 5
pi.hole
should respond with the actual IP of the server, not 0.0.0.0. That indicates that the domain pi.hole
is being blocked.
What does the web interface show for the domain request for pi.hole
?
Please post your docker-compose.yaml
or your docker run
command.
how do I make domain request via the web interface?
docker-compose.yml
:
version: "3"
services:
pihole:
image: pihole/pihole:latest
hostname: pihole
restart: unless-stopped
env_file: ./pihole/.env
network_mode: 'host'
volumes:
- './pihole/pihole:/etc/pihole'
- './pihole/dnsmasq.d:/etc/dnsmasq.d'
cap_add:
- NET_ADMIN
.env
:
TZ=Israel
I meant to have you make a query for pi.hole
on a client that used Pi-hole for DNS and then check the query log on the web interface to see what the log shows as the source of the answer.
but in the Pi-Hole Query Log page, it says Note: Queries for pi.hole and the hostname are never logged.
. Should I temporarily disable it somehow?