I have two routers. One of them encrypts everything with a wireguard interface and routes all traffic through my VPN provider. The other one is “plain”, unencrypted, and it is used for services that need a public IP. If all these services need is a public IP address that leads to the router’s wan port, I can still encrypt my DNS traffic, I thought, so I set up DNS over https (DoH), using my VPN provider’s servers. To do this on OpenWRT, which is my router’s operating system, I needed to download any one package that provides this functionality. I couldn’t just configure ports, firewall rules, NAT or whatever and be happy… Of the settings that this DoH package came with lets you choose a “bootstrap DNS”. It was configured to Google’s and Cloudflare’s servers by default, but I changed it to Quad9’s. Everything works fine. My VPN provider confirms that I am using their DNS servers and that my DNS traffic is encrypted.

What is going on under the hood? What is this “bootstrap DNS”? Why isn’t it as easy as exchanging public keys, as with regular traffic that goes through my VPN router’s wireguard port?

    • printf("%s", name);@piefed.blahaj.zoneOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      25 days ago

      I see. I just wonder why I couldn’t set the IP address for my DNS provider in the router’s configuration, since my VPN provider - whose DNS I’m using - provide the IP addresses and domain names on their website. 🤔

      • lime!@feddit.nu
        link
        fedilink
        arrow-up
        0
        ·
        25 days ago

        good question. looks like there isn’t a actually a standard way to initiate doh, because it’s still just a proposal.

        also i guess it’s helpful for getting through captive portals.

  • slazer2au@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    25 days ago

    Doh uses domain names for name servers as opposed to IP addresses, but as a freshly booted PC doesn’t know what IP your doh provider uses how does it craft a packet with a destination IP?

    That is where your bootstrap DNS comes in. You do one clear text DNS request for your doh provider, then all other DNS requests are encrypted.

    The public keys are stored brween reboots so no new exchange is needed.

      • slazer2au@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        25 days ago

        The benefit DoH has over DoT is https is pretty much always allowed while you can rather effectively block 53 to everything except the name servers you want people to use.

    • printf("%s", name);@piefed.blahaj.zoneOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      25 days ago

      I guessed as much. But, as I wrote to the commenter, I wonder why I couldn’t just provide the DNS server’s IP address in the router’s configuration and thus avoiding that initial plain text bootstrapping step. I guess my other question - why there needs to be a separate package to set this up as opposed to “simply” configuring the router - is more about the specific OS than networking.

      Thanks for sharing your insights! 😊

      • slazer2au@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        25 days ago

        There will generally be some form of load balancer in front of a HTTPS server even one that provides DoH services, and those load balancer won’t know where to send the random https packet destined for it’s own IP without a routing url.

        • printf("%s", name);@piefed.blahaj.zoneOP
          link
          fedilink
          English
          arrow-up
          0
          ·
          25 days ago

          Right, but my VPN provider provides both IPs and URLs to their servers, so I’m still wondering why I need a separate package on OpenWRT to be running in the background for this, i.e, why I can’t just point all the DNS queries that comes to the router in question to that IP and URL. Again, maybe it’s a really OpenWRT specific question… Sorry 😅

          • tal@lemmy.today
            link
            fedilink
            English
            arrow-up
            0
            ·
            25 days ago

            why I couldn’t just provide the DNS server’s IP address in the router’s configuration and thus avoiding that initial plain text bootstrapping step.

            my VPN provider provides both IPs

            If they don’t identify their DoH server by name, but rather by IP address, I’d imagine that it would work. Have you tried?

            searches

            https://forum.openwrt.org/t/need-help-understanding-bootstrap-fallback-and-upstream-servers-in-dnsproxy-package/214070

            If your upstream servers don’t need name resolutions (by using raw IP addresses), you don’t need bootstrap servers.

            EDIT: I personally wouldn’t be too fussed about using an ISP’s server to do that DNS resolution, unless one is concerned about your configuration still working even if the ISP’s DNS server is broken.

            • From a privacy standpoint, the ISP is, well, your ISP. It can see traffic and can probably figure out that you’re using DoH to a given provider anyway, and that’s all the information it gets from a single query for the DoH server.

            • From a security standpoint, DoH should be authenticated via TLS, so the best an evil bootstrap DNS server can do is to produce a denial-of-service situation by pointing you somewhere that doesn’t provide valid DoH responses, not cause you to trust some bogus DoH server.

            • printf("%s", name);@piefed.blahaj.zoneOP
              link
              fedilink
              English
              arrow-up
              0
              ·
              25 days ago

              Spot on. Thanks so much! I have been too busy reading and writing about electricity while also helping dad to digitize his old VHS tapes and C64 floppies to search the OpenWRT forums on my own! Bad excuse but still. 🤣

              Answering your question, no, I haven’t tried because of the above reason + I hate to see my Tor bridge down if for whatever reason I’d fuck things up and lose connection. 😅 Once I pull my head out, I’ll try pointing the DNS queries directly to their DNS servers’ IP address(es)!

              Thanks again!