Setting up Pi-hole

Soldato
Joined
11 May 2007
Posts
8,917
Location
Surrey
Only issue I've had with using mine as the DHCP server is that leases didn't renew properly after 24 hours. Ended up setting the lease as a year long and I'll deal with everything not connecting next Feb. :D
 
Soldato
Joined
24 Sep 2015
Posts
3,670
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.
 

Ev0

Ev0

Soldato
Joined
18 Oct 2002
Posts
14,152
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? :)
 
Soldato
Joined
24 Sep 2015
Posts
3,670
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.
 

Ev0

Ev0

Soldato
Joined
18 Oct 2002
Posts
14,152
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:
Soldato
Joined
24 Sep 2015
Posts
3,670
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.
 
Soldato
Joined
18 Oct 2002
Posts
4,533
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. :)
 
Soldato
Joined
17 May 2013
Posts
2,872
Location
West Sussex, UK
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
 
Soldato
Joined
19 Oct 2002
Posts
6,829
Location
Bath
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?
 
Don
Joined
19 May 2012
Posts
17,148
Location
Spalding, Lincolnshire
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
 
Soldato
Joined
19 Oct 2002
Posts
6,829
Location
Bath
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.
 
Soldato
Joined
18 Oct 2002
Posts
4,533
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.
 
Soldato
Joined
14 Oct 2009
Posts
9,541
Location
UK
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!
 
Soldato
Joined
19 Oct 2002
Posts
6,829
Location
Bath
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.
 
Soldato
Joined
18 Oct 2002
Posts
3,512
Location
UK
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