I've searched for answers and looked through the FAQ. I have pi-hole set up as a docker container on an RPi3. Every device on my LAN (phones, smart speakers, etc.) seems to work fine, except my macbook cannot resolve anything.
On the macbook, I tried setting the network connection use the DNS server that the router's DHCP tells it, and I also tried setting the network connection to use the pi-hole DNS server directly. Neither work. I did the necessary sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
as well.
One peculiar thing I noticed is at least on the macbook, the router is returning itself as the DNS server, though I think this is a separate problem since the name lookup failures still occur when I set the DNS server manually on the macbook to the RPi's address
The RPi is 192.168.0.10
and the router is 192.168.0.1
.
Expected Behaviour:
DNS lookups occur on all devices on the LAN.
Actual Behaviour:
DNS lookups succeed on all devices except a macbook. nslookup
on the macbook works and shows the right DNS server, but ping
does not resolve IPs, nor do browsers.
$ ping www.reddit.com
ping: cannot resolve www.reddit.com: Unknown host
$ nslookup -q=AAAA www.reddit.com
Server: 192.168.0.10
Address: 192.168.0.10#53
Non-authoritative answer:
www.reddit.com canonical name = reddit.map.fastly.net.
Authoritative answers can be found from:
fastly.net
origin = ns1.fastly.net
mail addr = hostmaster.fastly.com
serial = 2017052201
refresh = 3600
retry = 600
expire = 604800
minimum = 30
Debug Token:
https://tricorder.pi-hole.net/JR0NFTdK/
Docker Compose
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
# DNS Ports
- "53:53/tcp"
- "53:53/udp"
# Default HTTP Port
- "8080:80/tcp"
# Default HTTPs Port. FTL will generate a self-signed certificate
- "8443:443/tcp"
environment:
TZ: 'America/Los_Angeles'
# Set a password to access the web interface. Not setting one will result in a random password being assigned
FTLCONF_webserver_api_password: 'password'
FTLCONF_dns_listeningMode: 'all'
# Volumes store your data between container upgrades
volumes:
# For persisting Pi-hole's databases and common configuration file
- './etc-pihole:/etc/pihole'
cap_add:
- SYS_NICE
restart: unless-stopped