I've set up Pi-hole as a docker on a raspberry pi, but I still have to disable the dns server in OpenWrt, as far as I understood, to make Pi-hole being used.
In Luci, when I navigate to DHCP and DNS, I read the following below the headline:
"Dnsmasq is a combined DHCP-Server and DNS-Forwarder for NAT firewalls"
This confuses me a little bit. Does it mean, I cannot deactivate OpenWrt's DNS server without also disabling OpenWrt's DHCP server, which I'm still using and want to use in the future?
In the "Interfaces" -> "LAN" -> "General Settings" tab I saw a "Use Custom DNS" and there I added my raspberry pi's ip.
Running a nslookup from my CMD, the server requested is still my OpenWrt router. Also when I execute the following commands before:
Afterwards I rebooted the router, reconnected my wifi device to the router, ran the ipconfig release and renew and flushdns commands I mentioned in the first post.
and set the Pi-hole docker env variable FTLCONF_LOCAL_IPV6 to fe80::1, restarted the raspberry pi, but nothing changed.
Something I remembered was: I have an iphone and can manually set the DNS to 192.168.0.2. In this case, webpages in Safari cannot be loaded anymore on the smartphone. No idea why it cannot reach the webpages.
The Pi-hole itself seems to work, at least the admin page tells me in some cases that queries, probably directly from the raspberry pi, were routed over Pi-hole.
Any ideas why this could be the case? I can e.g. call via the browser http://192.168.0.2/admin and see the config page. So in general it's reachable and port "forwarding" for port 53 on TCP and UDP is also made (this is, how it's shown in portainer):
At least for everything going on on the raspberry pi, it seems to work. E.g. when I open phpmyadmin running on another docker container on the same pi, it calculates the queries made.
Executing the command for open tcp and open upd ports on the raspberry pi
Thanks a lot for your help. I managed to get it work in the morning. The problem was: The Pi-hole dns config was restricted to "Allow only local requests".
I want to let everybody with potentially the same problem know how I found the problem and how I fixed it.
In the Pi-hole admin mask navigate to Tools-> Pi-hole diagnosis.
There I found the dnsmasq warning "ignoring query from non-local network 192.168.0.40
Navigate to Settings -> tab DNS
Find the Potentially dangerous options section
Check Respons only on interface eth0 -> or any other of the potentially unsafe options that make sense for you (read the warning message below these options)
Save
When I now call some websites with lots of ads I see the queries counter increasing and also the blogged queries counter.
Thanks once again to both of you. I'm happy it's now working.
I wanted to try it out and get cleanly rid of it again, in case it don't like it. Since I'm not a networking expert, I would be interested, why this is curious for you and/or why it shouldn't be installed in docker.
For me, from my current experiences (some hours surfing) using Pi-hole on my Raspberry Pi 4 with 4 GB is really performant and I don't remember any performance issues while surfing.