docker-pi-hole
docker-pi-hole copied to clipboard
Documentation Error for Fedora Usage
This is a: Documentation Error
Details
This section is inaccurate on modern Fedora, it might be written with Ubuntu in mind https://github.com/pi-hole/docker-pi-hole/tree/4cb3c3a16d4d571408f83640487017799402b50b?tab=readme-ov-file#installing-on-ubuntu-or-fedora
There are two issues that stand out to me:
- As far as I know, modern Fedora does not ship with
netplan, sosystemd-resolvedon Fedora cannot use it by default. I do not know enough aboutnetplanto say if installing it is sufficient to fix this or if that requires configuration. - About the line
sudo sed -r -i.orig 's/#?DNSStubListener=yes/DNSStubListener=no/g' /etc/systemd/resolved.conf; it might be worth mentioning that (as far as I know, at least on some versions),/etc/systemd/resolved.confmight not exist by default; a template for it can be copied into/etc/systemd/resolved.conffrom/usr/lib/systemd/resolved.conf. I believe this change was made in Fedora 40? I think a better option would just be:
$ [ -d /etc/systemd/resolved.conf.d ] || sudo mkdir /etc/systemd/resolved.conf.d
$ echo '[Resolve]' | sudo tee /etc/systemd/resolved.conf.d/10-pihole.conf
$ echo 'DNSStubListener=no' | sudo tee -a /etc/systemd/resolved.conf.d/10-pihole.conf
This stack overflow post seems to indicate that https://unix.stackexchange.com/questions/761092/fedora-systemd-resolved
Related Issues
- [x] I have searched this repository/Pi-hole forums for existing issues and pull requests that look similar
This #1365 is about a README overhaul in general, but the description is mostly empty so I am assuming it is not talking about this issue
Environment data
- Operating Systems: Fedora Workstation 40, Fedora Cloud 41, Fedora Minimal 41
$ [ -d /etc/systemd/resolved.conf.d ] || sudo mkdir /etc/systemd/resolved.conf.d
$ echo '[Resolve]' | sudo tee /etc/systemd/resolved.conf.d/10-pihole.conf
$ echo 'DNSStubListener=no' | sudo tee -a /etc/systemd/resolved.conf.d/10-pihole.conf
I can confirm that the readme instructions no longer work for Fedora. However your solution did not work to free port 53 either unfortunately.
$ [ -d /etc/systemd/resolved.conf.d ] || sudo mkdir /etc/systemd/resolved.conf.d $ echo '[Resolve]' | sudo tee /etc/systemd/resolved.conf.d/10-pihole.conf $ echo 'DNSStubListener=no' | sudo tee -a /etc/systemd/resolved.conf.d/10-pihole.confI can confirm that the readme instructions no longer work for Fedora. However your solution did not work to free port 53 either unfortunately.
Did you restart the service after adding the conf file?
I restarted systemd-resolved yes and I'm still getting:
Nov 15 09:33:52 localhost.localdomain pihole[2063]: Error: netavark: IO error: Error while applying dns entries: IO error: aardvark-dns failed to start: Error from child process
Nov 15 09:33:52 localhost.localdomain pihole[2063]: Error starting server failed to bind udp listener on 10.40.0.1:53: IO error: Address already in use (os error 98)
Ah... @zwimer, I must apologize. It appears that I am facing a Podman only issue, which I understand is not supported by this container. I tested your solution on a fresh Fedora 41 system with Docker and it works great.
This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.
This issue is not stale- there is a PR addressing it now.
Issue fixed by https://github.com/pi-hole/docs/pull/1266 and https://github.com/pi-hole/docker-pi-hole/pull/1863. The change that works with Fedora is available at the following link: https://docs.pi-hole.net/docker/tips-and-tricks/