docker-pi-hole icon indicating copy to clipboard operation
docker-pi-hole copied to clipboard

Documentation Error for Fedora Usage

Open zwimer opened this issue 1 year ago • 6 comments

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:

  1. As far as I know, modern Fedora does not ship with netplan, so systemd-resolved on Fedora cannot use it by default. I do not know enough about netplan to say if installing it is sufficient to fix this or if that requires configuration.
  2. 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.conf might not exist by default; a template for it can be copied into /etc/systemd/resolved.conf from /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

zwimer avatar Oct 30 '24 23:10 zwimer

$ [ -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.

OptimoSupreme avatar Nov 15 '24 14:11 OptimoSupreme

$ [ -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.

Did you restart the service after adding the conf file?

zwimer avatar Nov 15 '24 14:11 zwimer

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)

OptimoSupreme avatar Nov 15 '24 14:11 OptimoSupreme

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.

OptimoSupreme avatar Nov 15 '24 16:11 OptimoSupreme

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.

github-actions[bot] avatar Dec 16 '24 08:12 github-actions[bot]

This issue is not stale- there is a PR addressing it now.

zwimer avatar Dec 17 '24 02:12 zwimer

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/

LizenzFass78851 avatar Jul 14 '25 04:07 LizenzFass78851