New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PiHole DHCP has wrong dhcp-option=option:dns-server #429
Comments
I have exactly the same issue. |
The simple fix seems to be to create a new config file, for instance |
Thanks for re-explaining, this makes more sense now. Sounds like a legitimate bug. MACVLAN/Host are the work around for now until a fix can be added. This might require non-docker repository changes to make that configurable. |
Maybe, for starters, just make dnsmaq dhcp config honor the |
Clobbering pre existing settings and overwriting configuration methods is OK when you're a 3rd party project but we can do things better than that. I don't have time to nail down a fix right now but some relevant upstream lines of code are here:
Edit: perhaps just set DHCP_ROUTER in setup vars? |
Hi, in reply to what exactly was the workaround, I tried to document everything on these pages:
http://www.electricbrain.com.au/pages/desktop-datacenter-software/pi-hole-docker.php
http://www.electricbrain.com.au/pages/desktop-datacenter-software/dnscryptvpnpihole.php
Hope this helps.
PhillB
…Sent from my iPhoneX
http://www.electricbrain.com.au/
On 15 Apr 2019, at 5:05 pm, zurajm ***@***.***> wrote:
I have exactly the same issue.
@melbcycle what exactly you're using in 02-pihole-dhcp.conf as workaround?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
This issue has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/docker-incorrect-dns-address-being-sent-to-dhcp-clients/34468/2 |
Thanks for the fixes here. Minor point of clarification. For an IPv4 DNS Server option, you want: (Threw in some Google DNS servers there for backups.) What's in there now is the option for IPv6 DHCP options: (It is odd that's hard-coded. I believe it's pulling [::] from /etc/resolv.conf? When I enabled the pihole's DHCP, it started handing out my router's IPv6 address as the DNS server.) So when I tried to replace [::] with my pihole's IPv4 address, FTL failed to startup with this error in /var/log/syslog
|
@darryllee I know it's an old post but in case anyone else comes around. The reason you got that error message is If you aren't using IPv6 you can delete the |
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. |
I'm running docker.io/pihole/pihole:4.2.2_armhf.
Devices using dhcp receive the container's IP address and the DNS host.
I am not using --net=host.
A working config is described here:
http://www.electricbrain.com.au/pages/desktop-datacenter-software/pi-hole-docker.php
This is a...
Description
The web interface needs to include an option to use the host's IP address for DHCP option dns-server.
Expected Behavior
DHCP Clients should get the host's address returned for DNS server (not the container's)
Actual Behavior
All requests receive the container's IP address (which can be the hosts if --net=host is used).
Possible Fix
Work-around is to add entry to 02-pihole-dhcp.conf and then use:
chattr +i 02-pihole-dhcp.conf
to prevent the web interface from making changes.
Steps to Reproduce and debugging done
e.g. your docker run command, pages to visit, CLI commands you ran
Debug steps I have tried
docker run
example in the readme (removing any customizations I added)Context and extra information
PiHole container is running fine with the workaround. It uses standard networking now and does not require --net=host. It might even work with zero additional privileges. Note: dhcrelay is essential.
Your Environment
The text was updated successfully, but these errors were encountered: