Make Raspberry Pi not use pihole for its own DNS

Hi guys

Sorry if the title is confusing

Basically, I want the Raspberry Pi to not use Pi hole for its own DNS requests. My Pi is a headless media/download box, so blocking of ads is a waste of time.

I tried to edit the /etc/resolv.conf file to point to 8.8.8.8, although I am not sure if thats the correct way of going about it.

If it is, then my next problem is that the /etc/resolv.conf file reverts to "nameserver 127.0.0.1" after a reboot.

Any help would be appreciated.

Thank you !

Why do you think that? Using the Pi-hole for resolving DNS locally on the Raspberry comes at no extra costs! Instead, the caching property of our DNS server will give significant speedup for repeated queries for the same domain. Are you actually having problems that things are blocked which shouldn't be blocked? If not you should leave it like it is. If you want to exclude the queries of the Pi from the web UI then you will be able to do this with the new release.

My Pi runs various download programs. If I look at the query log, Pi Hole blocks some of the domains that these downloaders try to access. As I have redundancy in these download programs, I don't experience any actual problems in functionality, but there are some domains that are needlessly being pi-holed.

I understand that I could whitelist the domains, but that would require me continuously checking the query log, to try and find domains that are being pi-holed on localhost (the raspberry pi), which is a waste of my time, when I'd actually like no domains to be pi-holed for localhost.

Currently, my Raspberry Pi is the Top Client usage wise. Not using itself as a DNS server would also decrease overall load. It's a Raspberry Pi A model (the oldest), with 256MBs of RAM, so every bit of processing power is precious. :smile:

I do the development also on an old revision (v1 B+) so I try to keep the code as efficient as possible!

I have one further question: How is DHCP managed in your network? I suppose you have configured the router such that it points all devices to the Pi-hole as DNS server (as is the recommended way)?

Haha, code efficiency is much appreciated.

No, I have not used the DHCP method, as my router is locked to follow a DNS set by my ISP. I manually point my devices to use the Raspi as the DNS server.

Well, then this is a situation I haven't come across yet and which I cannot test (easily).

Does this work? If yes we could easily set up a cron job that changes this line after each reboot automatically.

It did not work, and still uses Pi Hole as the DNS.

I've decided to take your advice and whitelist the necessary domains.

Thank you for your time !

Bump.

I'm using the same pi running pihole as an upload server/seedbox, so my logs are constantly getting clogged up by the Pi's DNS requests. Still looking for a solution to this!

Re-edit the /etc/resolv.conf file to point to 8.8.8.8, then lock it with:

sudo chattr +i /etc/resolv.conf

You can unlock the file anytime with:

sudo chattr -i /etc/resolv.conf

2 Likes

This worked PERFECTLY. Thank you!

Sounds exactly like my problem...