13

What is DNS over TLS (DoT), DNS over Quic (DoQ) and DNS over HTTPS (DoH & DoH3)?

DNS is an old protocol lacking all forms of security. Yet, it is one of the most fundamental protocols of the Internet. DoT and DoH are improvements to add transport security to the DNS protocol by reusing the same security layers used by HTTPS: TLS. Both DoT and DoH use TLS. DoH adds HTTP/2 between DNS and TLS for the framing. DoT also has a framing layer inherited from DNS over TCP, but it is ridiculously simple compared to HTTP/2. They both run on top of TCP.

More recently, Quic was added to the mix. Quic is an odd beast that takes TCP, TLS and the stream capability of HTTP/2 and merge them into a natively encrypted protocol implemented on top of UDP. From this new transport protocol, we get two new variants: DoQ which is similar to DoT but is using the stream capability of Quic instead of the DNS over TCP framing, and DoH3 which is DNS over HTTPS/3, HTTP/3 being HTTP over Quic.

All those protocols offer similar advantages but they have some key differences:

  • DoT and DoQ use a custom ports (tcp/853 and udp/8853 respectively) which can be easily blocked by firewalls while DoH uses the same port and protocol as used for all HTTPS web traffic (tcp/443), making it harder to block or even detect. DoH3 uses udp/443, so it is easier to block but still indistinguishable from other web traffic using this protocol, and HTTP/3 capable clients have the capability to fallback to HTTP/2 when this happens.
  • The HTTP/2 protocol used by DoH is significantly more complex than the basic framing employed by DoT. The advantage of DoH is that most HTTP/2 implementations are battle tested and offer good performance, while most DoT implementations get the DoT “spec” wrong, leading to poorer performance. When properly implemented, DoT offers lower complexity, which may theoretically have a small positive impact on battery usage, but it might be a drop in the bucket compared to TLS. The difference in latency should be non-perceivable though. 
    DoQ and DoH3 on the other side both use the same framing provided by the Quic protocol, which is greatly inspired by the HTTP/2 protocol. The different in complexity between DoQ and DoH3 is thus even thiner than between DoT and DoH.
  • As DoH uses HTTP, when implemented into a browser, there is the concern of having the same tracking capabilities as used on the web (user-agent, cookies etc.). To date, all popular clients, browsers included, are not sending any fingerprintable headers, run with no cookie jar and don't even send a user-agent.
  • DoQ and DoH3 are more resilient to packet loss. DoT and DoH are running on top of a single TCP connection, meaning that in case of a packet loss, all DNS queries or responses after this packet have to wait for the lost packet to be retransmitted (this is called head of line blocking). Thanks to Quic stream design, a single Quic session can carry multiple individual streams. Each stream is independent, and a loss of a packet only affects the stream it is associated with. With both DoQ and DoH3, each DNS query/response is isolated in its own stream, eliminating the head of line blocking issue described above. Those protocol are thus particularly well suited for mobile or highly congested networks, but won't make any substantial difference on a healthy network. One drawback is that Quic is all implemented in userland, and thus requires more CPU and battery to run than TCP. This can be an issue for bandwidth intensive applications, but DNS being pretty light, the difference should be negligible with most implementations.

Some experts like Paul Vixie recommend DoT over DoH. We don’t share this position and generally recommend DoH as it has less chances of being blocked and implementations are often better and clients supporting HTTP/3 can automatically benefit from it or fallback in case of issue thanks to the Alt-Svc/HTTPSSVC protocol negotiation.

NextDNS supports all 4 protocols. See the setup tab for more information on how to use them.

80 replies

null
    • Chris_Leidich
    • 3 yrs ago
    • Reported - view

    Noticed today that my iPad running iOS 14.5.1 appears to be connecting over DoH3 using the native encrypted DNS. Looks like maybe Apple added this in a recent update. Anyone else seeing this?

      • Chris_Leidich
      • 3 yrs ago
      • Reported - view

      Rob My iPhone (also running 14.5.1 with native DNS) still shows regular DNS-over-HTTPS. Not sure what is special about the iPad, or else this is being gradually deployed somehow by NextDNS.

      • iOS Developer
      • Rob
      • 3 yrs ago
      • Reported - view

      Chris Leidich What do you mean with "native DNS"?

      • NextDNS iOS App?
      • NextDNS Apple configuration profile?
      • Pro subscriber ✓
      • DynamicNotSlow
      • 3 yrs ago
      • Reported - view

      Chris Leidich i can't confirm that with my iPad 2020.

      Your screen looks also like the NextDNS app as the NextDNS website doesn't provide a "show Tracker Insights" menu.

      • Chris_Leidich
      • 3 yrs ago
      • Reported - view

      Rob Using the config profile, not the app

      • Chris_Leidich
      • 3 yrs ago
      • Reported - view

      DynamicNotSlow The screenshot was from my phone, it shows that link on the smaller screen version of my.NextDNS.io.

      test.NextDNS.io shows DOH3 too. Haven’t been able to reason out why my iPad is special compared to other iOS devices I have though. Just an interesting observation for now.

    • balachandar
    • 3 yrs ago
    • Reported - view

    NextDNS i used https://doh3.dns.nextdns.io/ in android Firefox nightly but https://test.nextdns.io/ shows protocol is doh

    According to mozilla Web servers can indicate support by using the Alt-Svc response header or by advertising HTTP/3 support with a HTTPS DNS record. Both the client and server must support the same QUIC and HTTP/3 draft version to connect with each other. For example, Firefox currently supports drafts 27 to 32 of the specification, so the server must report support of one of these versions (e.g., “h3-32”) in Alt-Svc or HTTPS record for Firefox to try to use QUIC and HTTP/3 with that server. When visiting such a website, viewing the network request information in Dev Tools should show the Alt-Svc header, and also indicate that HTTP/3 was used.

    • balachandar
    • 3 yrs ago
    • Reported - view

    Doh3 is working on android Firefox nightly. https://test.nextdns.io/ shows protocol as doh3 and about:networking shows doh3.dns.nextdns.io uses http/3

    • Carrot_eggs
    • 3 yrs ago
    • Reported - view

    https://doh3.dns.nextdns.io/info

    Has been blocked by SNI in China

      • Jason_Hawkins
      • 3 yrs ago
      • Reported - view

      Carrot eggs are you surprised? They block everything they can lol

      • minqi_wm
      • 1 yr ago
      • Reported - view

      Carrot eggs You did't even use HTTP/3.

    • andrew_hill
    • 3 yrs ago
    • Reported - view

    DoH....moving DNS into the application layer may be great for privacy but how do you now stop malicious software from contacting their own DNS servers and hiding their nefarious activity.

    Also I could set the DNS  in the router, but since DoH is using port 443 what stops an application or a user from using whichever DoH server they want and bypassing the NextDNS protections/blocklists etc?

      • Pro subscriber ✓
      • DynamicNotSlow
      • 3 yrs ago
      • Reported - view

      andrew hill malicious software doesn't need any DNS.

      If you want stop malware at that level, it's already too late.

      • andrew_hill
      • 3 yrs ago
      • Reported - view

      DynamicNotSlow I am talking about a layered approach and this is taking one layer away as well as creating another set of problems like local LAN resolution.

    • andrew_hill
    • 3 yrs ago
    • Reported - view

    OK so what's the point of nextDNS then if it can be so easily bypassed?

    "NextDNS protects you from all kinds of security threats, blocks ads and trackers on websites and in apps and provides a safe and supervised Internet for kids — on all devices and on all networks."

      • Pro subscriber ✓
      • DynamicNotSlow
      • 3 yrs ago
      • Reported - view

      andrew hill you should first read about how DNS works.

      NextDNS works as expected / as DNS works.

      • andrew_hill
      • 3 yrs ago
      • Reported - view

      DynamicNotSlow OK lets say we trust NextDNS or Cloudflare but don't trust some other random DNS provider, since DoH is using 443 how do you stop any application from using whichever DNS it feels like, now you have to maintain a list of non approved DNS resolvers to block at the firewall level, an impossible task.

      • andrew_hill
      • 3 yrs ago
      • Reported - view
      • Pro subscriber ✓
      • DynamicNotSlow
      • 3 yrs ago
      • Reported - view

      andrew hill you can't. Also, as i said already application doesn't need DNS.

      Applications can also use internal system processes to circumstances your blockage. Badness enumeration just don't work.

      • Pro subscriber ✓
      • DynamicNotSlow
      • 3 yrs ago
      • Reported - view

      andrew hill typical media nonsense.

      Also, none of that you post is related to NextDNS nor this topic.

      • Utai
      • 2 yrs ago
      • Reported - view

      DynamicNotSlow 

      • Pro subscriber ✓
      • DynamicNotSlow
      • 2 yrs ago
      • Reported - view

      Utai ?

      • aioyups
      • 1 yr ago
      • Reported - view

      DynamicNotSlow yup agreed it's typical media nonsense.

      Encrypted dns definitly increase more security, despite it's weakness since nothing perfect in the world. It's like adding lock to a house it will increase security despite thief can still pick the lock. Only fake expert will says bullshit like a lock causes more problems than it solves. 😂

      • aioyups
      • 1 yr ago
      • Reported - view

      andrew hill it's entirely different case. Nextdns only provide secure dns service, and yet you ask about maintaining firewall to prevent application/user mischief.

      It's quite not logical to ask a $2 service to protect you from all kind of threat. 😅😅

    • Luke_Skywalker
    • 3 yrs ago
    • Reported - view

    Can somebody comment on DoH3 available on iOS via NextDNS? I have both an iPhone and iPad with latest iOS. I tried both the iOS NextDNS as well as the NextDNS profile, and I can’t get anything about DoH3. How did Chris did this above?

      • NextDNs
      • 3 yrs ago
      • Reported - view

      Luke Skywalker still not working in beta 3. We're working with Apple to make it work eventually.