12 ms·
DNS over TLS – Thoughts and Implementation
- tssva 8y agoArticle starts by stating that DNS doesn't provide a means to guarantee integrity of the returned DNS data. 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.
- bluejekyll 8y agoYou're correct DNSSEC and DNS-over-TLS/DoH (DNS-over-HTTPS) both provide different, and necessary, aspects of securing records in DNS. 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.
- tptacek 8y agoThere's two ways to ensure the authenticity of data delivered over the Internet. You can authenticate the content or you can authenticate the channel. 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.
- seabee 8y agoPractical forgery attacks against an arbitrary client are hard, but configuring a public WiFi AP to intercept your favourite repeating-digit DNS server is trivial. Lots of people use public WiFi! 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.
- bogomipz 8y agoI used Stubby and Quad9 for a few months last year but I found the latency pretty terrible unfortunately. I would be curious to hear what other people are using and what their experience has been.
- gsich 8y agoYou need to keep the connection open.
- bogomipz 8y agoCan't that only be done for a max of 10 seconds though? So beyond 10 seconds, you have the connection overhead all over again no? https://dnsprivacy.org/wiki/display/DP/Configuring+Stubby https://dnsprivacy.org/wiki/display/DP/Configuring+Stubby
- berti 8y agoYes. IIRC from my testing a while back, both 1.1.1.1 and 9.9.9.9 close TLS connections either immediately or after a short timeout. Short timeout could work if you're running a larger network, but not so much at home.
- gsich 8y agoYes. I run a bind on a server which forwards all queries to quad9 (udp) Then I stunnel that port and use stubby on my side. The connection is open longer, but still closes occasionally, so I just resolve a name every x seconds. Not the best way.
- ggm 8y agoI used SSH SOCKS tunnels with stubby to keep myself online inside China's state firewall two recent trips. commercial VPN are routinely slowed down or blocked, if you have the luxury of an SSH enabled host "outside" you can use, Stubby and this are good, to get around DNS rewriting tricks and port/ip filters. 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.
- dagenix 8y agoPrediction: DNS-over-TLS won't win. I don't think it's going to be able to get around the non-standard port issue. 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.
- nykolasz 8y agoI hope you are wrong. We don't need one more protocol tunneled through HTTP.
- dagenix 8y agoWhy? What's the specific harm? AIUI, as long as the request still fits into a single frame, its not anymore inneficient.
- nykolasz 8y agoFirst, I think it gives too much power to the browsers. Firefox was already taking some dangerous choices with DNS over HTTPS on some of their recent changes. Chrome as well, doing changes that will benefit Google, in detriment of the rest of the web. 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.
- dagenix 8y ago> First, I think it gives too much power to the browsers. Firefox was already taking some dangerous choices with DNS over HTTPS on some of their recent changes. Chrome as well, doing changes that will benefit Google, in detriment of the rest of the web. I really don't understand how DNS-over-HTTPs benefits Google to the detriment of the web anymore than over TLS would. I'm not really sure how either hurts the web. > 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. Port 443 is generally unblocked. Port 853 is often blocked. How does tunneling via HTTP on port 443 hurt anyone? Yeah, it's ridiculous, and, a result of ridiculous middle boxes imposing silly policy. But, if you can't change that (and you can't), then, what is the harm? A few wasted bytes? So what? As long as it still fits in a single frame, it still a single round trip on the network.
- alecbenzer 8y agoWhat's the point of confidentiality for DNS? Can't an attacker pretty easily get IP-to-DNS mappings to discover who you're talking to? I guess not in the case of VPNs/TOR?
- kromem 8y agoNot in the case of Tor, but also not in the case of almost all/most cloud hosted services. 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.
- dagenix 8y ago... except that SNI isn't encrypted.
- kromem 8y agoGood point - I totally forgot about that. So yeah - it mostly only matters for VPN/Tor traffic.
- deleted 8y ago[deleted]
- computerfriend 8y agoNot yet, but encrypted SNI is on the way.
- auslander 8y ago> Cloudflare proxies about 10% of the Internet ... and strips SSL off on their side, so 10% of internet is, in fact, MITMed.
- nykolasz 8y agoPretty much there are 3 competing implementations for DNS resolution encryption (won't call it security): * 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 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-resolvers.md 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_list_of_public_dns_resolvers_curated_by/ https://www.reddit.com/r/sysadmin/comments/976aj2/updated_li...
- auslander 8y agoI recently configured my OPNsense router, for DNS over TLS with Quad9, with certificate domain validation. It uses included Unbound resolver. Not sure what I achieved, but it does feel good :) https://forum.opnsense.org/index.php?topic=9197.msg41265#msg41265 https://forum.opnsense.org/index.php?topic=9197.msg41265#msg...
- Fnoord 8y agoI've done the very same thing, on an EdgeRouter Lite [1]. Quad9 also supports DNSSEC. [1] https://www.chameth.com/2017/12/17/dns-over-tls-on-edgerouter-lite/ https://www.chameth.com/2017/12/17/dns-over-tls-on-edgeroute...
- auslander 8y agoWell done ! 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 :)
- Fnoord 8y agoIts based Vyatta/VyOS [1]. There's a way to get OpenBSD running on it as well, but I don't have a link handy. 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... [1] https://en.wikipedia.org/wiki/VyOS https://en.wikipedia.org/wiki/VyOS [2] https://news.ycombinator.com/item?id=17530086 https://news.ycombinator.com/item?id=17530086
- auslander 8y ago> ... do a lot of work yourself What work? Install is super easy ... I use OPNsense on small, fanless, cheap 'mini PC' with 2 LAN ports, you buy from aliexpress. Full x86-64, Intel with AES-NI support, for like $200 with 4GB RAM and 40GB ssd
- auslander 8y agoProject dnsprivacy-monitoring, auto updated table of supported security features by DNS provider: https://dnsprivacy.org/jenkins/job/dnsprivacy-monitoring/ https://dnsprivacy.org/jenkins/job/dnsprivacy-monitoring/
- fanf2 8y agoI deployed DNS-over-TLS on Cambridge University’s central recursive DNS servers last week, and they immediately started receiving traffic from Android P users - not very much traffic, a few queries per second, but not negligible. I did some followup investigation of how Android behaves in the wild and posted them to the IETF DoH list (and the dprive list but for some reason those copies did not go through) - see https://mailarchive.ietf.org/arch/msg/doh/I-ytiO6ykbt9krrC9FVGEFo-CA4 https://mailarchive.ietf.org/arch/msg/doh/I-ytiO6ykbt9krrC9F... and the corrections and further information in the replies. I still need to verify that TCP fast open is working, to minimize the DoT latency.
- amaccuish 8y agoIs there a new dhcp option to indicate availability, or is it opportunistic, when the device notices port 853 is open?
- fanf2 8y agoAndroid 9 Pie is opportunistic: it tries to connect to port 853 and sends a probe query to make sure the server behaves plausibly well. Other clients need explicit configuration.