Please follow the below template, it will help us to help you!
I have have made two instals of PiHole on two raspberrypi's - the first one is set up on an Airport Express router and I have changed the router's DNS to the PiHole and it works just fine. The second one is on a DLink 850 router and it does not work. I read many reports about the inablility to change DNS settings for LAN on DLink so I am just changing the DNS settings on my Macbook that's linked to the router through LAN
Can you post screenshots of the D-link "DHCP server" options ?
If it lacks the options to assign DNS servers to the clients through DHCP, alternatives are to configure all your clients DNS settings manually or ...
disable DHCP on the router and activate the DHCP service from Pi-hole as a replacement:
I've tried to activate the Pi-Hole DHCP server but then the Pi-Hole cannot access the internet due to the inability to set LAN DNS on the D-Link router. Now I have set the client DNS to the Pi-Hole server but ads are still not blocked alas!
I cant see the settings that are required to push a DNS server to the clients through DHCP.
Best is to use Pi-hole's DHCP service.
If you configure Pi-hole's "Upstream DNS Servers" to that of for example Google's, you circumvent DNS resolution via your router (take it out of the loop).
Do you have an example link with ads ?
And when on the clients, you do below lookup, does your Pi-hole IP address display like in below example where my Pi-hole IP is 10.0.0.2 ?
I used this and disabled my router's DHCP server. In this case Iost connection to the internet. I could ping the Pi-hole from the client but nslookup 'hostname' was not connecting.
I then went back to routers DHCP and setting ip address of Pi-Hole as DNS on my client and in this case, I was back on the internet but no ad blocking (for example on [Mod Edit: Link no longer available])
Did you disconnect & reconnect network on the client or reboot it after you switched DHCP from router to Pi-hole ?
Whenever you change DHCP settings, you need to do the above or those settings wont propagate (or wait until the DHCP lease expires which could take a long time).
What do you mean, you literally typed "nslookup ‘hostname’" ?
Why didnt you try "nslookup pi.hole" ?
If you want to query a particular DNS server in your network, you could do like so:
nslookup pi.hole <IP_DNS_SERVER>
What "Upstream DNS Servers" do you have configured on the Pi-hole web GUI ?
You said you were able to ping Pi-hole after the switch but were unable to do DNS lookups against it.
Were you able to SSH into the PI after the switch ?
Flipping on the Pi-hole DHCP service should not alter any of the IP details for Pi-hole.
It could be that your router does something like below:
I can see this settings in your router "Enable DNS relay", not sure what that one does but you could try disabling it (for diagnosing) ?
You could also try connecting a CAT5 cable straight from Pi-hole to one of your clients.
See if the client receives an IP address from Pi-hole and try to do the lookup again with the router out of the loop.
Yes, I have been able to ssh into the pi-hole throughout. I cannot ping the router from pi-hole with DHCP on pi-hole
Flipping on the DHCP server on the pi-hole changes the IP address of the pi-hole to outside the range specified - I guess that's normal?
Rebind protection - I guess that's what my router is doing - I don't know how to turn it off though, its a D-Link DIR850 router and I've seen many issues that people have logged with this router on pi-hole
Tried - with no luck
Will try when I get my hands on a suitable adapter - I am using a PiZeroW for the pi-hole server and it doesn't have a CAT5 port unfortunately.
I have now gone back to the following config:
DHCP on router
Client connected via Ethernet to router and DNS on client pointing to Pi-hole ip address
Ads are still not blocked - I ran pihole -d and uploaded the debug data - token is ndis41x35d
Quite confused actually!
Thanks for all the prompt help!