I'll try to be short.
I have a Pihole server, along with two instances of Unbound, and a DoH server (DNS over HTTPS). Using the following docker images:
Pihole is set up, then inside Pihole for Upstream DNS Servers, I have two instances of Unbound running and set within Pihole's settings:
https://preview.redd.it/0s4bxbe3vf2e1.png?width=498&format=png&auto=webp&s=75c24905f885bdd9440be846d66092f4ffa6f191
Then for the DoH server, I have the upstream set to Pihole
doh: container_name: doh image: satishweb/doh-server:latest restart: unless-stopped networks: dns: ipv4_address: ${DOH_DNS_IP} environment: UPSTREAM_DNS_SERVER: "udp:pihole:53"
All of this works, I can set my client machine to my Pihole server with DNS over HTTPS enabled, and everything functions great.
The issue is the server itself. I'm trying to figure out what should be in my server's /etc/resolv.conf
If I open my /etc/resolv.conf and use the following:
nameserver 10.10.10.10 nameserver 10.10.8.8
My client + Pihole setup still works. I can browse the internet on my client machine, and Pihole gives my client machine the info it needs. However, if I go over to my server and run certain commands that require internet access, like apt-get, or sometimes a wget command, I get time outs.
But if I switch the nameservers over to something like quad9 or Cloudflare, it all works again.
So the question becomes, what nameservers / DNS is my actual server supposed to have? Or why are certain commands timing out if they require internet access, only when I set my server's nameservers to the local Unbound containers.
As I said, Pihole keeps working, so it's not cutting off internet, it's just certain things start to fail.
I've read guides online where others are doing exactly what I'm doing, or they'll set their nameserver to 127.0.0.1, so I'm wondering where I've done wrong, or what I'm looking over which is causing said issue.
Any pointers would be awesome. Other than this issue, the setup seems to work just fine.
submitted by