this post was submitted on 24 Feb 2025
32 points (94.4% liked)

Selfhosted

44306 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

Hello lemmings! I have recently started the process of setting up my own Pi-Hole, I am a developer and pretty comfortable with Linux but I am a bit of a newcomer when it comes to networking.

Now, during the process I noticed that the VPN I use (Mullvad) claim to have DNS leaks (This is a bit obvious since I was no longer using the DNS they expected in the VPN tunnel). So after reading a bit on the pi-hole guides I figured I'd set up a cloudflared service, but instead of using the cloudflare dns-query I route it to Mullvads own DNS.

Now this works fine and all, it's DoH and running Mullvads own DNS to query so Mullvads own tool is happy with the DNS settings I have.

However, I also read about unbound in the Pi-Hole guides. I was curious if this was to prefer over cloudflared? Since I am running through Mullvads own DNS I don't think there should be any issues. However locally hosting your own recursive DNS server also sounds good.

What is your opinion? Is it overkill? Is what I have now enough or should I try to set up unbound aswell?

Happy with just a discussion around this to learn more, just curious whether I should continue cooking on what I have now or if I should just focus on getting the entire network set up to use this.

top 8 comments
sorted by: hot top controversial new old
[–] [email protected] 4 points 1 month ago (1 children)

I prefer cloudflared myself.

While unbound requests its answers from the authoritative servers for each domain; it does so using regular DNS queries, so it's susceptible to monitoring and modification like any other DNS request. While adding latency by extending that request to several servers, instead of a single trusted provider.

That doesn't really seem beneficial to me. I'd rather use DOH.

[–] [email protected] 1 points 1 month ago (1 children)

Unbound supports DoH if compiled with the support and given TLS certificates. I don't use it internally on my home network because I have a pihole that I want to capture the traffic. I do use DNS over TLS for upstream communication, though.

[–] [email protected] 1 points 1 month ago (1 children)

DoH on the lan between devices is completely pointless; I'm talking about DoH between the lan and external dns which unbound does NOT do.

[–] [email protected] 1 points 1 month ago* (last edited 1 month ago)

DNS over TLS handles that. No need for DoH really. Unless DNS ports are blocked or captured by NAT or something and you need to use port 443 with DoH. At least not with a DNS server.

DoH is useful for individual applications to do their own DNS lookups bypassing the OS or network level DNS. Otherwise DoH and DoT provide the same basic protection. DoT is just at a lower network layer and thus more easily applies more broadly across the network or OS rather than being application or resolver specific. There's never been a real need for a DNS server to use DoH instead of DoT unless DoT is blocked upstream.

[–] [email protected] 4 points 1 month ago

I think what you have is fine, and wouldn't worry about it too much.

That said, I run unbound with pi-hole, directing the dns queries through a wireguard tunnel. It's a bit slower, but I do like having my own recursive DNS, especially with news that more and more services are implementing DNS level blocking.

[–] [email protected] 3 points 1 month ago (1 children)

However, I also read about unbound in the Pi-Hole guides. I was curious if this was to prefer over cloudflared?

Many people advocate for Cloudflared as a tunneling solution, but it’s not a one-size-fits-all tool. Personally, I avoid it. Your VPS already functions as a firewall for your connection. Using Tailscale is also self-host and avoids reliance on third-party services like Cloudflare while maintaining security and the same functionality.

For DNS privacy, I prefer odoh-proxy, which enables your VPS to act as an oDoH (Oblivious DNS over HTTPS) proxy for the cloudflare network. While oDoH introduces a slight latency increase, it significantly enhances privacy by decoupling query origins from content, making it a more secure option for DNS resolution. So you would be able to set your DoH resolver to your domain (https://dns.whatever.com/dns-query) and it would forward the request to cloudflare for resolution, and then back again.

As for Pi-Hole, its utility has diminished with the modern alternatives like serverless-dns. It allows you to deploy RethinkDNS resolver servers on free platforms, handling 99% of security concerns out-of-the-box. The trade-off is a loss of full custody over your DNS infrastructure, which may matter to some users but is less critical for general use cases.

Lastly, using consumer VPNs like Mullvad to proxy connections often introduces unnecessary complexity without meaningful security gains. While VPNs have their place they can really overcomplicate setups like this and rarely provide substantial privacy benefits for services like DNS.

[–] [email protected] 0 points 1 month ago

Many people advocate for Cloudflared as a tunneling solution, but it’s not a one-size-fits-all tool. Personally, I avoid it. Your VPS already functions as a firewall for your connection. Using Tailscale is also self-host and avoids reliance on third-party services like Cloudflare while maintaining security and the same functionality.

OPs not using cloudflareds tunneling or services at all; in this application, it's purely a local tool for translating regular DNS to DOH using the chosen DOH provider. Mullvad in this case.

[–] [email protected] 1 points 1 month ago

I'd recommend pihole->dnscrypt->mullvads DNS server.