Hello there.
Before I decided to post this, I read several forum topics containing similar problems with the general resolution being things I have definitely already tried. I have resorted to asking for help from much more intelligent people than I in the attempt to resolve these issues I can not get to the bottom of. I appreciate your patience, as I am not expert.
I am struggling to get Pi-Hole to block ads (and several other issues, but one at a time).
Pi-hole is installed via docker compose
on Ubuntu Server 22.04.3.
The device I am using is on Windows 10 with Chrome.
I have set my Windows machine to use DNS servers 192.168.1.2
I have installed pi-hole via docker-compose with the following .yaml
file.
pihole:
container_name: pihole
image: pihole/pihole:latest
env_file: .env
ports:
- "192.168.1.2:53:53/tcp"
- "192.168.1.2:53:53/udp"
- "192.168.1.2:80:80/tcp"
environment:
WEBPASSWORD: secret
PIHOLE_DNS_: 192.168.1.1
FTLCONF_LOCAL_IPV4: 192.168.1.2
TZ: ${TZ}
PUID: ${PUID}
PGID: ${PGID}
volumes:
- ./etc-pihole:/etc/pihole
- ./etc-dnsmasq.d:/etc/dnsmasq.d
restart: unless-stopped
PUID/PGID is a user I have made specifically for docker
.
192.168.1.1 is my routers address. I have also tried setting PIHOLE_DNS_
to my local DNS server and 8.8.8.8.
192.168.1.2 is my server with Pi-Hole installed on it.
This is my only container.
I have used the Pi-hole web UI to change the DNS settings Interface listening behavior to "Listen on all interfaces, permit all origins" as suggested by https://hub.docker.com/r/pihole/pihole.
Browsing to http://pi.hole/admin/ does not work, but browsing to 192.168.1.2 does.
I saw the following advice on https://github.com/pi-hole/docker-pi-hole#readme. I have followed it. It has not worked before or after following these steps. I am unsure if this is outdated. Please advise.
Installing on Ubuntu or Fedora
Modern releases of Ubuntu (17.10+) and Fedora (33+) include systemd-resolved which is configured by default to implement a caching DNS stub resolver. This will prevent pi-hole from listening on port 53. The stub resolver should be disabled with:
sudo sed -r -i.orig 's/#?DNSStubListener=yes/DNSStubListener=no/g' /etc/systemd/resolved.conf
This will not change the nameserver settings, which point to the stub resolver thus preventing DNS resolution. Change the
/etc/resolv.conf
symlink to point to/run/systemd/resolve/resolv.conf
, which is automatically updated to follow the system's netplan:sudo sh -c 'rm /etc/resolv.conf && ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf'
After making these changes, you should restart systemd-resolved usingsystemctl restart systemd-resolved
I am using https://www.speedtest.net/ as my test site if that makes a difference. My machine shows up as a client in the query log, just nothing (noticeable) is blocked.
Apologies for the wall of text. I thought the more information the better.
Really appreciate anyone willing to walk me through some further troubleshooting
Kindest regards.