Hey, I’m trying to proxy my local Adguard Home server through Cloudflare Tunnel to have my own privat DNS (for my phone and maybe my family). I don’t want to open my firewall.
I have two main problems:
- The DNS server is accepting DoH with
dig @<local ip> cloudflare.com +https
but not withcurl -k -v -H 'accept: application/dns-message' 'https://<local ip>/dns-query?name=cloudflare.com&type=A'
. I think the Cloudflare Tunnel will do a normal HTTPS request like curl and this is not working. The server returns a ‘400 Bad Request’. - When I proxy the server through the tunnel,
dig
is trying to first resolve the ip behind the domain and then it is making the request directly to the (I think) load balancer of Cloudflare. Because there is no domain in this request, the load balancer isn’t proxying the request and the connection dies. I did not try if Android is having the same issue, but I think so.
Is it possible to proxy DNS requests or is there a workaround?
I am using Cloudflare Tunnel in Docker. I think that is a limitation for a possible configuration.