NHacker Next
login
▲Configuring Split Horizon DNS with Pi-Hole and Tailscalebentasker.co.uk
66 points by gm678 7 hours ago | 17 comments
Loading comments...
dolmen 4 hours ago [-]
The post says:

> Side note: for those wondering, Tailscale is Canadian and can't see the content of connections (although if you're worried about this it's also possible to self-host using Headscale).

However this is no longer the case. From Tailscale's Terms of service "Schedule A", "New customer accounts on or after September 3, 2024" are bound to "Tailscale US Inc., a Delaware corporation"

doctorpangloss 2 hours ago [-]
It can’t see the contents of connections but it records all the metadata. You know a lot about what the contents are going to be based on the ports. The default configuration of Tailscale will also collect all your DNS requests.

https://github.com/tailscale/tailscale/issues/16165

elashri 2 hours ago [-]
I do force all plain DNS on port 53 to my local dns (Adguard home + unbound on a gl-inet router). And I block common DoH addresses. There are many lists on Github. I collect them using github action to have one big list of their IP and addresses and block them.

This is not a bullet proof solution in case there is a semi known custom DoH an application use. But it is the best that I can do without Enterprise network gear and more complex setup that I would like to maintain.

baby_souffle 2 hours ago [-]
Would you be willing to share the list sources you use?
metadat 47 minutes ago [-]
And perhaps automate pushing to a gist or repository?
bozhark 1 hours ago [-]
Seconded
leipert 5 hours ago [-]
> Chromecasts ignore local DNS... grrr

Can’t you force traffic to 8.8.8.8 / 8.8.4.4 (especially port 53) to hit your PiHole instead?

gerdesj 2 hours ago [-]
Its a trick one. Traditional DNS runs over port 53/udp and fails over to 53/tcp for large queries/results. That's easy to deal with on a packet filter firewall.

Then in the name of ... something, something, security ... DNS over http(s) was invented. Now you can balkanize DNS by requiring certain SSL certificates be involved. To my knowledge this hasn't been abused large scale yet but it could.

Let's go easy on the tinfoil and simply redirect outbound traffic to 53/udp and tcp to a PiHole or other DNS server under your control.

If you insist on the tin foil, you will probably need to look into a MitM proxy such as Squid - look into "bump" and "spice".

watersb 4 hours ago [-]
My older Kindle Fire HD 10 flips over to DNS over HTTPS if it can't see Google on port 53.

I've tried to add a couple of rules in iptables on my Ubiquiti Dream Machine (UDM), but the out-of-box configuration on the UDM is pages and pages to iptables rules. I can modify that config via a shell interface (a shell script with four iptables command lines), but it doesn't play with the web based GUI, and I have yet to figure out how the UDM handles such traffic.

Yes, I've simply blocked all traffic for 8.8.8.8 and 8.8.4.4, via the UDM GUI, the rules are there. The Kindle still shows me ads.

It may be possible to delete the entries for Google DNS on the Kindle via adb commands during boot, but I haven't gotten that far.

Someday I will get around to setting up a homelab network enough to learn iptables etc without blacking out my home network. As any network outage bring immediate screams from the house, I have to treat the firewall configuration as critical infrastructure: brittle. Don't touch.

OptionOfT 42 minutes ago [-]
With the UDM you can do DNS masquarade to redirect traffic destined for 8.8.8.8:53 to your local pihole / AdGuard instance.
ectospheno 4 hours ago [-]
Hagezi and others provide reasonable DoH block lists.
temp0826 4 hours ago [-]
Iptables can be used to dump any traffic destined for port 53 to a dns server of your choosing, but I don't know if something like that exists in consumer routers. (Blocking a baked in doh client is a lot more complicated...)
Melatonic 4 hours ago [-]
Yeah it would depend on your equipment - but basically if stuff pins and IP instead of doing DNS you would have to block the IP's of all the common resolvers (or at least the ones it will try)
VTimofeenko 3 hours ago [-]
Why not forbid going outside on port 53 and (optionally) redirect to the local DNS servers:

(nftables syntax)

ip saddr != @lan_dns ip daddr != @lan_dns udp dport 53 counter dnat ip to numgen inc mod 2 map { 0 : 192.168.1.1, 1 : 192.168.1.2 } comment "Force all DNS traffic to go through local DNS servers"

joombaga 5 hours ago [-]
I think you can just block Google's servers and it'll use the DHCP-configured DNS server.
api 3 hours ago [-]
On my LAN I send all DNS traffic to pi.hole with iptables. Won’t help if they DoH tunnel it though.
snvzz 51 minutes ago [-]
I use headscale and took the high road: Tailscale IPs all the time.

Why trust the wires at all. Just run all traffic through VPN, even if it's in the same LAN.

This way, I know all traffic is encrypted. I don't have to worry about SMB or the like being plaintext.