DNS-over-TLS Part 2: Impeding my network for little benefit

cetaSYN
4 min readApr 14, 2018

--

NOTE: This is outdated. pfSense now has GUI options to do the same as what is described here that work better. I am currently using the GUI options and have had no issues as are described below. Furthermore, TLS1.3 is gaining ground quickly.

Or how I made the other people on my network hate me for doing unnecessary things.

About a week ago I set up DNS-over-TLS. It was a neat little thing to do, and I enjoyed seeing how it affected my traffic. I can now say, first-hand, it does exactly what it says on the tin. My traffic to and from the DNS resolver was encrypted. Lookups were hidden from those who might have otherwise observed my DNS traffic. Is it worth it? It might be for you, but for myself it wasn’t.

Complaints

Confidentiality Bypass

Sure, the DNS is encrypted, but it was still very easy to figure out where I was communicating.

For example:

  1. Here we see the domain being resolved over 853, DNS-over-TLS.
    Nothing significant to see.
  2. Then an HTTPS session starts up with a server hosted on Linode.
    Since Linode is shared-hosting, we can’t just reverse the IP to figure out what is hosted at that address.
  3. But take a look at the certificate exchange.
    The name of the resource being visited is visible in plaintext.
    I was visiting DarkSky.

The destination-confidentiality provided by DNS-over-TLS has just been rendered useless by the communication session itself.
This is about the point where I had people tell me, “Well, who is actually gonna break open a packet that deep?”

Well, bettercap has support for it. and Sophos Firewall uses it for categorization.
I’d venture a guess that this is being pulled out in DPI pretty often by anyone with an interest in where you’re going. (See: ISPs)

So, it’s not the magic “traffic cloaker” that seems to be touted right now.

Performance

While running DNS-over-TLS, lookup times more than doubled. Everything dragged, especially on domains with a large number of referenced subdomains.
Looking at the packet captures, it seemed like a new TLS session was set up for every queried domain and subdomain.

It was quickly suggested by others using my network to undo whatever the heck I did to cause the slowness.

I didn’t run any benchmarks myself, but I will link to “A performance test of DNS over different transport protocol” by Runxia Wan back in 2016. As shown in their tests, TLS is significantly slower than regular DNS, but this gives me hope for DNS-over-HTTPS in the future.

Benefits

It’s not a complete wash though. As I said before, it might be worth it to you. Here’s some cases to consider where it would benefit:

Transparent DNS Proxying

A nice explanation and graphic from DNSLeakTest.com.
Some ISPs really really want you to use their DNS servers, so that they can do sneaky logging, redirection, and injection.

DNS-over-TLS would prevent that, because all the actual DNS request data is encrypted.
The worst your ISP could do is block the data altogether, and you’d definitely notice not being able to resolve anything.

Embedded User Data

The DNS Privacy Project details another concern that I hadn’t considered. Apparently some ISPs embed user metadata in the queries. Being uniquely identified behind NAT is definitely a more significant privacy concern than just traffic eminating from a home network as a whole. Specifically-targeted user-metadata in plaintext? Count me out.
My ISP doesn’t do this, so it’s not a problem for me yet. If they start, I’ll probably find a way to improve my encrypted-DNS experience and stick with it.

VPN Leaking

The internet loves it’s VPNs right now. Whether you’re doing it for privacy at a public spot, to hide your nefarious movie downloads, or other reasons, you’re relying on your DNS to be encapsulated in the VPN tunnel for both confidentiality and integrity.
Unfortunately, that’s not always guarenteed. DNS ‘leaking’ outside of a VPN is an easy mistake to make, and could completely undermine the tunnel itself. By setting up the host to use encrypted DNS, you’re ensuring that even if your VPN leaks, it isn’t visible to anyone observing the traffic.

The Future

The future comes with TLS 1.3. Cloudflare did a nice TLS 1.3 Overview and Q&A if you’re interested. The part that is relevant here is that the certificate is now encrypted, repairing the earlier mentioned confidentiality bypass. There are still issues, as discussed by @filosottile, but it’s a significant step in the right direction.
When TLS 1.3 starts gaining mainstream acceptance, I may try out DNS-over-HTTPS.

Summary

There’s significant steps being made to secure DNS. It may be worthwhile for some individuals to jump onboard now, but for myself, I’ll wait a while longer.

Credit

Twitter:

Thanks to @orcakeiko for giving me a starting point for further research.

The Many Hats Club:

Thanks to @proxyblue for giving their take on the benefits to encrypted-DNS.
Thanks to @uncl3dumby for playing both advocate and critic, prompting discussion.
Lastly, thanks to sae (Couldn’t find Twitter) for participating in the discussion and prompting further research into TLS 1.3.

Other references linked inline.

--

--