Howdy Everyone!

As I am setting up my infrastructure at home using docker I wanted to ask, is it better to have DNS, something like pi-hole, on my main docker swarm or would it be better to have it on a dedicated machine/docker host separate from the rest of my infrastructure?

Thanks for the input!

  • dan@upvote.au
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    2 months ago

    AdGuard Home is a better choice than PiHole since it uses DNS-over-HTTPS by default. There’s also an app called AdGuardHome-Sync to sync settings between multiple instances.

    I’d recommend running two DNS servers, and at least one of those separately from the rest of your infrastructure like on a Pi. That way, if you need to pull one of them offline, the internet still works.

    • Encrypt-Keeper@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      arrow-down
      1
      ·
      edit-2
      2 months ago

      I would say Pihole is a better choice than AdGuard home because PiHole just runs on top of dnsmasq. Throw Unbound on there too as your upstream recursive resolver and you’re set. You don’t even need to worry about an encrypted session to your upstream anymore because your upstream is now your loopback.

      • dan@upvote.au
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        2 months ago

        Throw Unbound on there too as your upstream recursive resolver

        If you want to run your own recursive DNS server, why would you run two separate DNS servers?

        You don’t even need to worry about an encrypted session to your upstream anymore because your upstream is now your loopback.

        Your outbound queries will still be unencrypted, so your ISP can still log them and create an advertising profile based on them. One of the main points of DoH and DoT is to avoid that, so you’ll want them to be encrypted at least until they leave your ISP’s network.

        • Encrypt-Keeper@lemmy.world
          link
          fedilink
          English
          arrow-up
          0
          ·
          edit-2
          2 months ago

          If you want to run your own recursive DNS server, why would you run two separate DNS servers?

          I’m not sure I understand your question. A recursive DNS server and a local DNS cache/forwarder/are two different things with two different purposes. You will always need both. You yourself are using AdguardHome and that is just connecting to recursive DNS server upstream. In my scenario you’re just running both yourself instead of you running one and then letting a 3rd party run the other for you.

          Your outbound queries will still be unencrypted, so your ISP can still log them and create an advertising profile based on them.

          You can encrypt the recursive queries through your ISP if you want to. Though the effectiveness of any profiling your ISP would do to you are minimized by Qname minimization that Unbound does by default.

          If you’re just using DoH then you’re just shifting who’s making that advertising profile on you from your ISP to whoever is hosting your upstream recursive DNS server. It doesn’t matter how much encryption you do because on the other end of that encrypted connection is the entity who you’re giving all your queries to.

          • Shimitar@feddit.it
            link
            fedilink
            English
            arrow-up
            0
            ·
            2 months ago

            No you don’t need two: in fact I have only unbound setup to do everything with one piece of software.

            Better or worse? No idea, but it works and its one less piece that might fail.

            • Encrypt-Keeper@lemmy.world
              link
              fedilink
              English
              arrow-up
              0
              arrow-down
              1
              ·
              edit-2
              2 months ago

              I mean if you want to build something around Unbound to do ad blocking and set up a monitoring stack for metrics and all that jazz that’s great, more power to you. But you already have two things built for purpose, there’s no reason to go out of your way to do that. And I don’t think OP here is prepared to do all that.

  • schizo@forum.uncomfortable.business
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 months ago

    Either is fine: the question is what happens when something breaks and if you care about issues and such.

    If your docker host depends on the pihole it’s running, there can be some weirditry if it’s not available during boot and whatnot (or if it crashes, etc.).

    …I ended up with a docker container of pihole and an actual pi as the secondary so that it’s nice and redundant.

  • Decronym@lemmy.decronym.xyzB
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    2 months ago

    Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

    Fewer Letters More Letters
    DHCP Dynamic Host Configuration Protocol, automates assignment of IPs when connecting to a network
    DNS Domain Name Service/System
    HTTP Hypertext Transfer Protocol, the Web
    HTTPS HTTP over SSL
    IP Internet Protocol
    NAS Network-Attached Storage
    PiHole Network-wide ad-blocker (DNS sinkhole)
    SSH Secure Shell for remote terminal access
    SSL Secure Sockets Layer, for transparent encryption
    TLS Transport Layer Security, supersedes SSL

    8 acronyms in this thread; the most compressed thread commented on today has 6 acronyms.

    [Thread #970 for this sub, first seen 13th Sep 2024, 17:25] [FAQ] [Full list] [Contact] [Source code]

  • Pax@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 months ago

    I would suggest 2 pi-hole + unbound stacks on different hardware, preferably on different switches. That way you can restart/fiddle with things without your family going crazy about “internet not working”.

    • Fedegenerate@lemmynsfw.com
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 months ago

      I remember Watchtower helpfully stopping Pihole before pulling the new image when I only had the one instance running… All while I was out at work with the fiancée on her day off. So many teaching moments in so little time.

  • Shimitar@feddit.it
    link
    fedilink
    English
    arrow-up
    0
    arrow-down
    1
    ·
    2 months ago

    I have a quite rich selfhosted stack, and DNS is indeed part of it.

    For such a critical piece of infrastructure I didn’t needed a container, just installed Unbound and did some setup for ad blocking and internal DNS rules.

    Here my setup: https://wiki.gardiol.org/doku.php?id=router:dhcp-dns

    You could go with an independent pihole maybe, but that would double the chances of a hardware failure…

    Using one device for everything might seem risky, but actually has less chances of failure ;)