Help with config DNS server and DHCP server

Hello,

Yesterday I installed pi hole on my raspberry pi 3 B+. I had some problems during the installation but I succeeded. The problem is that although everything works, and the pi hole is active and I can access it via the ip address, I still see ads in every website. I can see in the stats of the pi hole that it blocked some queries but I still see ads. After the installation I saw that I should config the dns server but I didn't know how to it. In addition, I saw that I have to config the DHCP server of the pi hole if i don't have an option in my router but after I disabled the DHCP server in the router, I couldn't do nothing.

Please help me.

Thank you.

Or Montag

Even though Pi-hole is up and running your devices might still be using other DNS servers for their lookups, which means Pi-hole won't see those or be able to block them. What's the output of these two commands on the computer where you are still seeing ads?

nslookup pi.hole
nslookup flurry.com

That's true because you need to tell computers to use your new Pi-hole. One easy way to do this is to log in to your router, find the DHCP section, and find the entry where you can tell devices what DNS to use. Then you change that to be the static IP address of your Pi-hole. Save all the changes. Then disconnect and reconnect your computers from your network so they pick up the new settings.

That's the other way to do it. Pi-hole has its own DHCP server which is turned off initially. If your router doesn't let you modify the DHCP settings, you can instead turn off the router's DHCP and turn on the Pi-hole's DHCP. Now the Pi-hole will hand out addresses on your network, and as a bonus it will always tell your devices to use the Pi-hole for DNS.

You can turn on Pi-hole's DHCP in Settings > DHCP, tick the enabled box, type in your router's IP address where indicated, and pick a range of addresses to hand out. Eg if the router is on 192.168.1.1 and Pi-hole is on 192.168.1.2, then you could use 192.168.1.10 to 192.168.1.254 for the DHCP range. The scroll down and click Save. Finally, disconnect and reconnect your computers from the network to pick up the new settings.

Once done, try those two commands above once again.

The first one should give the address of the Pi-hole. The second one should be all zeroes because it's blocked by Pi-hole as standard.

I used the second option, now it works the pi hole ip is 192.168.1.17 and router is 192.168.1.1 so I used 192.168.1.10 to 192.168.1.254, it's ok?
Now I have an error in the pi hole diagnosis that saying:

" Warning in dnsmasq core:"
"DHCP packet received on eth0 which has no address"

That's the LAN settings in my router before I turned off the DHCP server:

The DNS server that I used in the settings in the raspberry pi is 213.57.2.5 as written in my router

Best now to create a debug log for someone to look at. It's in Tools > Generate debug log > tick box for Upload > click Generate debug log.

Once it's done post the debug token URL in here so staff can find it. And please also post the results of those two nslookup commands.

Already been asked for:

https://www.reddit.com/r/pihole/comments/115mtw9/help_with_config_dns_server_and_dhcp_server/

Ah I'm not on reddit, didn't realise

1 Like

https://tricorder.pi-hole.net/3u7NMbmg/

Warning in dnsmasq core:

no address range available for DHCP request via lo

That's normal when you run a debug log. Please do searches for any errors, here and on reddit where you are also posting. That would reveal for example this explanation from @jfb

When an interface does not have a DHCP configuration (such as the loopback interface lo, or other special interfaces such as docker0), this warning is printed. You can safely ignore it when it happens only during DHCP testing, e.g., during Pi-hole debug log generation.

Thank you.

Pi hole doesn't block ads in youtube and some ads in facebook. Can I do something with this?

Youtube is a common question, a forum search will find more info. In short, no. There are various Facebook adlists floating around, eg the ones at Developer Dan's page.

Thank you.

And what about the ads in my phone (samsung galaxy note 20 ultra)? Is there any way to block them? Phone is connected to the wifi network in my home

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.