Custom DNS and Pihole on Dietpi

I really just want to ask about custom DNS option when setting up Pihole.

When installing Pihole, you get the option to choose your upstream DNS. If my end goal is to use unbound and make a recursive DNS server, then what should I set as my custom DNS when initially installing Pihole? I've had to reinstall a few times due to this setting and not knowing exactly what to put here.

Let's say the IP of my Raspberry Pi is a static 192.168.1.188. Since that IP is what will eventually be put into my UniFi Controller, is that what I set as my DNS when initially installing Pihole? Or for the setup, do I need to use a public DNS (8.8.8.8 / 1.1.1.1 / whichever)?

Subsequently and just as important, should the DNS of the Dietpi be the same as the Pihole (in this example, 192.168.1.188)? My Dietpi install seems to require a public DNS. I assume that's so the Dietpi install has access to internet? Is that right?

Another thing I've noticed is that, on a fresh Dietpi install, before installing unbound, and when Pihole asks to set your IP to STATIC during install, I go to change the network settings in Dietpi from DHCP to STATIC, it automatically assigns my DNS to 127.0.0.1 which renders my Pihole and Dietpi without internet. When this happens, I can't even complete the Pihole install and end up having to reinstall Dietpi entirely. It doesn't matter what I do, my resolve.conf holds onto that loopback address and I can't get rid of it.

I've been googling this for 2 days and there are many other posts here, on the Dietpi forums, and Reddit with the same issue/question but there are no real solutions or each answer is kind of different.

Debug Token:

I can post this when I get home from work

On initial install, pick one of the upstream DNS servers and get started. When you get unbound installed and running, the unbound IP/port will go into the Custom1 setting on the web admin > Settings > DNS > Upstream DNS servers, and the original one you selected can be de-selected.

On the router and/or clients, they use the IP address of the Pi as the DNS server, and this does not change when you make any changes in Pi-Hole to select a different upstream server for Pi-Hole.

Thanks for this. Yeah, this is how I have it set up now and it is working. The main issue I was running into (aside from not knowing for sure what the initial DNS should be if you didn't want to use one of the upstream DNS) was mostly in Dietpi when you change the network setting from DHCP to STATIC, it sets the DNS of the Dietpi to 127.0.0.1 and thus leaving the Dietpi and Pihole with no internet.

And at least for me, this relates to Pihole because in the initial setup, Pihole asks you to set your IP to STATIC, which takes you to the Dietpi-config, and when you do that and when the 127.0.0.1 is set, it prevents the install from completing.

DietPi has a different distribution than you will find at pi-hole.net. They have a support site for their distribution.

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