I’m trying to figure out how to set up Pi-hole for the first time and I think I’m doing something wrong, or missing some important step(s).

I figured that using Docker would be the easiest way to get it running so I started with the sample yaml I found on the pi-hole/docker-pi-hole github page. Then I went to my router’s DHCP settings and set the primary DNS to the host’s IP (I’m not sure if that’s the correct one to use though*).

screenshot

My router's DHCP settings

Eventually I was able to confirm that a site I blocked was blocked when visiting it from the host PC, but my phone and other devices on my network could still visit the site.

Then I tried copying the same IP to the secondary DNS, but then I could no longer access the internet on other devices.

I also tried disabling the router’s DHCP server to use Pi-hole instead. I used the same default gateway IP I found in the router’s settings, but I lost internet on the other devices with that as well.

I know very little about configuring network stuff so I’m not sure what I might’ve done wrong.

*I also tried using the IP address I found in the Pi-hole’s system information section as the primary DNS, but then the site I blacklisted was no longer getting blocked on the host machine.

  • BlackEcoA
    link
    fedilink
    English
    arrow-up
    4
    ·
    3 months ago

    First, are you sure your Pi-hole’s DNS is exposed at port 53 and accepts traffic? Try using dig from another device to see whether it works or not

    dig +short @192.168.0.175 allowed-domain.tld
    dig +short @192.168.0.175 blocked-domain.tld
    

    If Pi-hole works, you should get 0.0.0.0 as an answer for any blocked domains.

    my phone and other devices on my network could still visit the site

    Have you tried disconnecting and reconnecting to the network in order to make sure these devices get new DHCP leases? Once it’s done, which DNS servers do they say they use? Also make sure your phone and computer’s browser aren’t using DNS-over-HTTPS or DNS-over-TLS (I know Firefox use Cloudflare’s DNS-over-HTTPS by default in some setups)

    • ExtraMedicated@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      3 months ago

      are you sure your Pi-hole’s DNS is exposed at port 53 and accepts traffic?

      I think this is where I went wrong. dig shows that the connection times out. This may also explain why forcing clients to use that for DNS would cause them to lose internet access. Although I thought that port would be open because it’s listed in the yaml file for docker-compose. Is there another step I need to open that from the host machine?