65 points · by kedmi · 8y ago · 86 comments
* DNSCrypt
* DNS over TLS
* DNS over HTTPS
If you are looking for something well tested and well supported, check out DNSCrypt (and the awesome DNSCrypt-proxy):https://github.com/jedisct1/dnscrypt-proxy
It doesn't get a much love as it should, but it is probably the best way to secure encrypt your DNS requests right now. The protocol was initially developed by OpenDNS, but many resolvers support it right now (cisco, cleanbrowsing, etc). The list of supporting services is impressive:
https://download.dnscrypt.info/dnscrypt-resolvers/v2/public-...
On the other hand, DNS over [HTTPS|TLS] are pretty new and don't have as much support, except for a few players. A good list if here as well:
https://www.reddit.com/r/sysadmin/comments/976aj2/updated_li...
Instead, I think DNS-over-HTTP is gonna be the champ. The overhead of HTTP is a minor issue, but, I think using a standard port more than makes up for it. I think the real inflection point is going to be once QUIC is more widely deployed. Combined with TLS's 0-RTT connection setup, we'll be able to get back to answering a DNS query in a single round trip (like today), but with assurances that the data wasn't monitored or tampered with between the client and the recursive resolver.
Second, I think it is an overall bad design choice to tunnel a lightweight protocol on top of HTTP on top of TLS. Instead of just tunneling it under TLS.
I think the big paradigm shift is "let's decouple DNS interactions from a specific transport" - and once you open up to that concept, the option of having multiple transports for different use-cases as things move forward seems practical.
I still need to verify that TCP fast open is working, to minimize the DoT latency.
Then mentions DNSSEC as a protocol which exists to provide such guarantee and promptly dismisses it along with DNSCURVE and DNSCRYPT as protocols which have been so infrequently deployed as to be non-existent.
Further on states that DNS over TLS and DNS over HTTPS don't solve the integrity problem but that is ok because DNSSEC will provide that.
My head is spinning.
Overwhelmingly, practical security schemes on the Internet rely on channel security. We rely on TLS to ensure the integrity of the DOM on websites; we don't cryptographically sign the pages themselves.
All things being equal, you'd like to be doing both things. You'd like to have cryptographically signed web page DOMs, for instance (among other things, it would make web crypto a lot more useful).
But all things aren't equal: content authentication is difficult to manage in practice, and every security protocol we adopt has a cost.
Long story short: if you can protect the channels used by DNS lookups, you can get by without protecting the content. That's roughly the idea behind DoH and DoTLS.
The reality though is that all you really need is "DNS over TCP" (which, of course, we've had since basically the beginning). Practical forgery attacks against TCP DNS are difficult enough as to not be worth the trouble.
In such a scenario a VPN is a more secure answer than DNS-over-TLS, but this isn’t a realistic answer for the average user. It has to be something that is free and easy to enable.
DNSSEC == authentication of records. DNS-over-TLS/DoH == privacy, and authenticity of the server/client.
Both are independently useful and enforce different things for us. The biggest issue with DNSSEC is that since it's not been widely adopted, what should you do with records that either are not signed, or are incorrectly signed? Most software doesn't really have a great way of raising DNS issues to the application in a way that users or something else could provide a security exception.
https://forum.opnsense.org/index.php?topic=9197.msg41265#msg...
Quad9 also supports DNSSEC.
[1] https://www.chameth.com/2017/12/17/dns-over-tls-on-edgeroute...
[0] https://github.com/m13253/dns-over-https/tree/master/doh-cli...
It is extra work either way. What is better performance though?
I'm using dnsmasq with Pi-Hole's blocklists, and forwarding to unbound for DNS over TLS. Forwarding to another client such as doh-client could also work though I'm not sure how this would work with Quad9.
My router is being backup for this ensure there's less load on the MIPS machine.
Go is cross-platform, sure. However dnscrypt-proxy [1] is also very portable.
- dnsmasq resolver using Stubby for DoT stuff
- Unbound resolver using Stubby for DoT stuff
- Unbound doing it all
The last one, as of today, is not quite ready, missing some stuff Stubby [0] does better.
[0] https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Daemon+-+...
How secure is this EdgeRouter lite? Is it open source? For what it's worth, I found one blog with VPNFilter botnet and Ubiquiti on the same page :)
The router isn't open hardware but its a good bang for the buck (I also run WireGuard on it, btw). If you want a fully open source router, I can recommend having a look at Router7 [2]. The author's using a PC Engines APU2.
Downside is you gotta do a lot of work yourself, just like with OPNSense. But I like OPNSense, even though the hardware from the company behind it is expensive the same is true for PFSense. And the company behind that isn't so friendly...
Yes, you have have slower paths, trombone paths. But in the circumstances I was in, Stubby was a godsend.
Also check out the dns security option in Android Pie.
It has to be said if you're trying to bypass DPI, speed isn't your main concern. I tolerated pretty low packet rates. If I had to VOIP it would have been awful
ex: https://medium.com/@nykolas.z/dns-resolvers-performance-comp...
The connection is open longer, but still closes occasionally, so I just resolve a name every x seconds. Not the best way.
Here is my story why I tried dnscrypt: https://medium.com/@nykolas.z/ending-dns-hijacking-with-dnsc...
For example, consider that Cloudflare proxies about 10% of the Internet. Well, if you request a site they proxy, and DNS is in the clear, it's obvious who you are connecting to.
But if you request a site and the DNS is encrypted, you could be visiting any one of 10% of the sites out there.
Similarly, if hosting on AWS or Google Cloud platform, there's a LOT of other services hosted in those IP blocks, and IPs change frequently, so there's a significant degree of ambiguity.
This is all in addition to fixing the threat of DNS leakage for VPN/Tor connections.
... and strips SSL off on their side, so 10% of internet is, in fact, MITMed.
(:
So yeah - it mostly only matters for VPN/Tor traffic.