4 ms·
a cool thing you can do with MagicDNS: Set your "global nameserver" to a host within your tailnet and run your own resolver accessible "anywhere". It's easy en
by rrix2 4y ago
a cool thing you can do with MagicDNS: Set your "global nameserver" to a host within your tailnet and run your own resolver accessible "anywhere".
It's easy enough to set up pi-hole.net on a machine on your LAN and configure your home router to hand out DHCP records that will instruct LAN machines to use it, but if I wanted to have DNS-based ad-blocking at the coffee shop or library or elsewhere I previously had my pi-hole listening on a public IPv4's port 53 and deal with resolve.conf etc... and boy howdy does running an internet-accessible DNS resolver suck! My server would receive millions of requests, weird reflection attacks like [1], probes, the whole nine, it made the dashboarding useless for personal tracking.
But now my pi-hole only listens on my LAN network and its tailnet address, and any machine connected to the tailnet including my phone will use the pi-hole without configuration on any network via MagicDNS.
[1]: https://www.linuxquestions.org/questions/linux-newbie-8/there-are-many-query-this-website-on-my-dns-server-4175676097/ https://www.linuxquestions.org/questions/linux-newbie-8/ther...
- kinduff 4y agoI have a similar setup but deployed my PiHole in Fly.io using a custom Docker image behind Tailscale. This way I can just connect to Tailscale and I have ad blocking automatically using their custom DNS servers. Very useful and I use it all the time on my mobile devices including my laptop when I'm using guest wifis.
- O_H_E 4y agoWOW, that is brilliant.
- shmoogy 4y agoIs this on fly.io free tier? How's latency to resolve on something that low end?
- archb 4y agoYes, is possible using the free tier: https://fly.io/blog/stuff-your-pi-hole-from-anywhere/ https://fly.io/blog/stuff-your-pi-hole-from-anywhere/
- archb 4y agoI have the same setup! Very happy with the Fly pihole + Tailscale combo, but I recently tried the Tailscale + NextDNS combo and I might move to it altogether. Only problem is that NextDNS seems blocked at my university and I am not sure how to solve that yet. Using pihole on Fly with Tailscale works fine.
- asymmetric 4y agoJust as a side note, I used to do this with plain WireGuard on a Hetzner node. I switched to NextDNS because of latency issues, but if this is not a concern, then it was a great setup, and Tailscale makes it even easier!
- moontear 4y agoGreat setup! But you didn’t say anything about MagicDNS, did you? You just set your global Nameserver to something on your tailnet and could disable MagicDNS for this use case?
- rrix2 4y agoI set my global nameserver within the MagicDNS configuration to use the pihole IP. If I didn't use magic DNS i would have to do this for each device, and on devices like Android etc each network i connect to. This requires no-thought for each device, just `tailscale up`