Setting up Pi-hole

I may have spoken too soon about the upgrade to v4.2.1 being painless. Every hour or so the DNS resolver stops on both my instances which is a bit of a pain. I haven't had a chance to look into it yet so for now I've set a cron job to do 'service pihole-FTL restart' every 30 minutes. That'll do until I have the time to look into it some more.
 
Is there a way to have conditional DNS servers for specified domains, but only for certain specified devices on the network?

I.e. set it so that by default requests from devices will normally be sent to the standard upstream DNS server by pihole, but for device X going to domain Y it will use a different upstream DNS server?

Any dnsmasq wizards know how that might be done? :)
 
That should be possible. I haven't tested it by create a file in /etc/dnsmasq.d called 02-domain.conf that contains:

server=/domain.com/1.2.3.4

Restart dnsmasq and then ay queries for domain.com should always be forwarded to 1.2.3.4. You could put the config into the existing 01-pihole.conf if you wanted but the changes would likely get lost when upgrading pihole.
 
Does that allow me to only set that for specific hosts on the network? (Is the server bit in reference to setting the machine it applies to?)

I don’t want everything to use the alternate DNS server when accessing that domain, just a couple of hosts.

Out at the moment but will give this a test when I can, thanks :)

Also need to work out best way of getting the logs into another system, would be so nice if there was a simple send to remote syslog server option available ;)
 
Last edited:
Ah, no, I missed that bit. I don't think there's a way to be that granular with conditional forwarding with dnsmasq. If you really need that then I think you'll need to run a separate instance for those specific hosts.
 
After 20 pages this may have already been mentioned, but if you haven't already, I'd recommend adding the following speetest functionality to your pihole deployments:

https://github.com/arevindh/pihole-speedtest/wiki/Installing-Speedtest-Mod

Have had this running on it for over a year now, and it has helped out a couple of times when our ISP speeds have dipped and the 1st line supports chaps won't admit there is an issue. :)
 
After 20 pages this may have already been mentioned, but if you haven't already, I'd recommend adding the following speetest functionality to your pihole deployments:

https://github.com/arevindh/pihole-speedtest/wiki/Installing-Speedtest-Mod

Have had this running on it for over a year now, and it has helped out a couple of times when our ISP speeds have dipped and the 1st line supports chaps won't admit there is an issue. :)

This looks to be an interesting feature, but surely using maximum bandwidth once an hour is going to slow the network down?

Lets say for example I'm streaming 4k content and it runs the test.
1. The test won't read true because I'm using a lot of the bandwidth
2. If the speedtest saturated the bandwidth, my streaming content would struggle/stop which would be annoying to say the least
 
Just set up Pihole on an old Gen 1B I found in a box of stuff a friend has given me, wanted to run Webmin alongside but it makes it chug like mad! :( currently running pihole in a docker on my server but not using it for DHCP as I would like, is the 1b too underpowered for a decent pihole of should i just dedicate it to pihole and forget about running anything else on it?
 
Just set up Pihole on an old Gen 1B I found in a box of stuff a friend has given me, wanted to run Webmin alongside but it makes it chug like mad! :( currently running pihole in a docker on my server but not using it for DHCP as I would like, is the 1b too underpowered for a decent pihole of should i just dedicate it to pihole and forget about running anything else on it?

I'm running pihole on a 1b - no issues, but the only things it's doing are pihole and a CUPS print server for my old USB printer
 
Thanks guys I think it's webmin that's killing it will reconfigure and try again.

Using rasp light image as don't need a GUI trying to stream line it as much as possible.
 
This looks to be an interesting feature, but surely using maximum bandwidth once an hour is going to slow the network down?

Lets say for example I'm streaming 4k content and it runs the test.
1. The test won't read true because I'm using a lot of the bandwidth
2. If the speedtest saturated the bandwidth, my streaming content would struggle/stop which would be annoying to say the least

I've never noticed any slowdown during streaming, and we stream everything (no terrestrial signal in our area).

You can also set the frequency of the tests, so it doesn't have to be every hour.
 
I want my router to still do DHCP so I am going to use the conditional forwarding setting in the PiHole interface. The ip of my router is fine but what is my local domain name?
Using a VM SuperHub3.

Maybe I am just super tired but I can't for the life of me work it out!
 
I want my router to still do DHCP so I am going to use the conditional forwarding setting in the PiHole interface. The ip of my router is fine but what is my local domain name?
Using a VM SuperHub3.

Maybe I am just super tired but I can't for the life of me work it out!
Whatever you want it to be.
 
I want my router to still do DHCP so I am going to use the conditional forwarding setting in the PiHole interface. The ip of my router is fine but what is my local domain name?
Using a VM SuperHub3.

Maybe I am just super tired but I can't for the life of me work it out!

In your router just set the upstream DNS to be your piHole’s internal IP address instead of the default and in your PiHole ensure DHCP is turned off and its upstream DNS to be Google, your ISP’s DNS or whatever you prefer. Job done and your router is doing the DHCP
 
Back
Top Bottom