Skip to content

[Feature Request] Adding Upstream DOH #308

Open

Description

@ebanDev

First of all thank you for the great software that is unbound! I think it would be really great if unbound integrated DOH support natively :)

Activity

  1. dtouzeau commented on Sep 15, 2020

    @dtouzeau

    In progress #255

  2. wcawijngaards commented on Sep 16, 2020

    @wcawijngaards
    Member

    Yes, if you seek those features then it can solve your request. The code there is usable right now if you want it in beta.

    If you wanted DOH towards upstream servers, then this is a new feature. And it should wait for the already referenced DoH implementation, and also for socket reuse changes that are upcoming. It would be prudent to then first resolve bugs in that code. And then start thinking about this feature.

  3. ebanDev commented on Sep 20, 2020

    @ebanDev
    Author

    Okay ! Thanks for your answers

  4. dtouzeau commented on Jan 24, 2021

    @dtouzeau

    Any news about this major feature ?

  5. yan12125 commented on Aug 18, 2021

    @yan12125

    also for socket reuse changes that are upcoming.

    @wcawijngaards Looks like the the socket reuse feature is ready in version 1.13.2? (with fixes #513 included). The only remaining issue might be that streams may not be reused on Windows (#516).

  6. p1r473 commented on Jun 22, 2022

    @p1r473

    I have it successfully using DOT (DNS over TLS) which is great

    #forward-ssl-upstream: yes - is the instruction to use DNS over TLS, in this case for all queries (name: “.”)
    server:
        tls-cert-bundle: /etc/ssl/certs/ca-certificates.crt
    forward-zone:
        name: "."
        forward-tls-upstream: yes
    
        # Cloudflare DNS
        forward-addr: 1.1.1.1@853#cloudflare-dns.com
        forward-addr: 1.0.0.1@853#cloudflare-dns.com
        #forward-addr: 2606:4700:4700::1111@853#cloudflare-dns.com
        #forward-addr: 2606:4700:4700::1001@853#cloudflare-dns.com
    
        # NordVPN
        #forward-addr: 103.86.96.100@853#dns1.nordvpn.com
        #forward-addr: 103.86.99.100@853#dns2.nordvpn.com
    
        # Quad9
        #forward-addr: 2620:fe::fe@853#dns.quad9.net
        #forward-addr: 9.9.9.9@853#dns.quad9.net
        #forward-addr: 2620:fe::9@853#dns.quad9.net
        #forward-addr: 149.112.112.112@853#dns.quad9.net
    
  7. endreszabo commented on Aug 3, 2022

    @endreszabo

    I have it successfully using DOT

    Great, but we need DOH here. Why? The restaurant across the street MITMs (and strips DNSSEC) raw DNS traffic and does not let TCP/853 (=DOT) through. However, access to TCP/443 (=DOH) works fine.

  8. mister2d commented on Aug 4, 2022

    @mister2d

    I have it successfully using DOT

    Great, but we need DOH here. Why? The restaurant across the street MITMs (and strips DNSSEC) raw DNS traffic and does not let TCP/853 (=DOT) through. However, access to TCP/443 (=DOH) works fine.

    I agree. My current workaround is using Unbound to pass DNS queries to a local cloudflared DOH proxy. Has been working great.

  9. p1r473 commented on Aug 4, 2022

    @p1r473

    I have it successfully using DOT

    Great, but we need DOH here. Why? The restaurant across the street MITMs (and strips DNSSEC) raw DNS traffic and does not let TCP/853 (=DOT) through. However, access to TCP/443 (=DOH) works fine.

    I agree. My current workaround is using Unbound to pass DNS queries to a local cloudflared DOH proxy. Has been working great.

    Can you post your config please?

  10. mister2d commented on Aug 4, 2022

    @mister2d

    I have it successfully using DOT

    Great, but we need DOH here. Why? The restaurant across the street MITMs (and strips DNSSEC) raw DNS traffic and does not let TCP/853 (=DOT) through. However, access to TCP/443 (=DOH) works fine.

    I agree. My current workaround is using Unbound to pass DNS queries to a local cloudflared DOH proxy. Has been working great.

    Can you post your config please?

    It's terribly simple. I have a separate cloudflared DoH proxy listening on 127.0.0.1:5053 with an unbound forward-zone configured to 127.0.0.1@5053.

    unbound.conf

    ...
    forward-zone:
    name: "."
      forward-addr: 127.0.0.1@5053
    

    You could test/replicate a cloudflared proxy setup with docker-compose.

    version: "3"
    
    services:
      cloudflared:
        restart: always
        image: cloudflare/cloudflared:2022.5.3
        command: proxy-dns
        environment:
          TUNNEL_METRICS: "0.0.0.0:9080"
          TUNNEL_DNS_ADDRESS: "0.0.0.0"
          TUNNEL_DNS_PORT: "5053"
          TUNNEL_DNS_UPSTREAM: "https://1.1.1.1/dns-query, https://1.0.0.1/dns-query"
          TUNNEL_DNS_MAX_UPSTREAM_CONNS: "10"
        ports:
          - "127.0.0.1:5053:5053"
  11. stm32repo commented on Jun 15, 2023

    @stm32repo

    Strange as it may seem, but the speed of DoH is much higher than DoT

  12. kkkgo commented on Apr 23, 2024

    @kkkgo

    Any progress?doh maybe useful in some network cases.

  13. salamdamai commented on May 5, 2024

    @salamdamai

    I have it successfully using DOT

    Great, but we need DOH here. Why? The restaurant across the street MITMs (and strips DNSSEC) raw DNS traffic and does not let TCP/853 (=DOT) through. However, access to TCP/443 (=DOH) works fine.

    I agree. My current workaround is using Unbound to pass DNS queries to a local cloudflared DOH proxy. Has been working great.

    Can you post your config please?

    It's terribly simple. I have a separate cloudflared DoH proxy listening on 127.0.0.1:5053 with an unbound forward-zone configured to 127.0.0.1@5053.

    unbound.conf

    ...
    forward-zone:
    name: "."
      forward-addr: 127.0.0.1@5053
    

    You could test/replicate a cloudflared proxy setup with docker-compose.

    version: "3"
    
    services:
      cloudflared:
        restart: always
        image: cloudflare/cloudflared:2022.5.3
        command: proxy-dns
        environment:
          TUNNEL_METRICS: "0.0.0.0:9080"
          TUNNEL_DNS_ADDRESS: "0.0.0.0"
          TUNNEL_DNS_PORT: "5053"
          TUNNEL_DNS_UPSTREAM: "https://1.1.1.1/dns-query, https://1.0.0.1/dns-query"
          TUNNEL_DNS_MAX_UPSTREAM_CONNS: "10"
        ports:
          - "127.0.0.1:5053:5053"

    What does your configuration file for cloudflared.service?

  14. zcchm commented on Jul 26, 2024

    @zcchm

    Any progress? Forward to DoH is useful in some scenarios.

  15. ninetailedtori commented on Feb 10, 2025

    @ninetailedtori

    I've got DoH working but not in unbound. The fix for now is to use unbound as a caching only, and forward to a separate DNS resolver
    like DNSproxy or DNScrypt-proxy, like stated before. It would be nice to have just one resolver that can handle all of it though.

  16. baudneo commented on Apr 6, 2025

    @baudneo

    I've got DoH working but not in unbound. The fix for now is to use unbound as a caching only, and forward to a separate DNS resolver like DNSproxy or DNScrypt-proxy, like stated before. It would be nice to have just one resolver that can handle all of it though.

    Agreed, I have the same setup and would prefer all unbound.

  17. gitbaby-afk commented on Aug 22, 2025

    @gitbaby-afk

    +1

  18. ddidderr commented on Feb 7, 2026

    @ddidderr

    Just a quick update for anyone who used cloudflared as a workaround for the missing DoH upstream feature:

    They removed the DNS Proxy feature as of version 2026.2.0.

  19. baudneo commented on Feb 7, 2026

    @baudneo

    Just a quick update for anyone who used cloudflared as a workaround for the missing DoH upstream feature:

    They removed the DNS Proxy feature as of version 2026.2.0.

    For more info: https://developers.cloudflare.com/changelog/2025-11-11-cloudflared-proxy-dns/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions