You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Howdy, I am witnessing plaintext DNS queries being sent out despite setting UPSTREAM_TYPE=DoT. The overwhelming majority of queries are via DoT but quite a few are being sent plaintext.
Just wondering if I've got some configuration wrong. I can't see any option to disable plaintext as the PLAIN_RESOLVERS environment variable does not have an option to disable, however I would assume that with UPSTREAM_TYPE=DoT that PLAIN_RESOLVERS is not applicable.
Expected behaviour:
When setting UPSTREAM_TYPE=DoT, only DoT queries should ever be sent to upstreams. Plaintext queries should never be sent under any conditions.
Observed behaviour:
Sometimes plaintext queries are sent. See packet captures and logs
03:09:41.480317 IP 172.17.0.1.51485 > 172.17.0.2.53: 61232+ [1au] A? tRaCKEr.ToRREnt.Eu.oRG. (63)
03:09:41.480876 IP 172.17.0.2.37505 > 8.8.8.8.53: 61232+ [1au] A? tRaCKEr.ToRREnt.Eu.oRG. (63)
In the below packet captures,
172.17.0.1 - client
172.17.0.2 and 2400:a840:405b:13a0:0:242:ac11:2 - dns server container (this project)
========================================
========================================
================= dns ==================
========================================
=========== Made with ❤️ by ============
======= https://github.com/qdm12 =======
========================================
========================================
Running version v2.0.0-beta built on 2024-11-04T16:43:20.157Z (commit 111c6a1)
🔧 Need help? ☕ Discussion? https://github.com/qdm12/dns/discussions/new/choose
🐛 Bug? ✨ New feature? https://github.com/qdm12/dns/issues/new/choose
💻 Email? [email protected]
💰 Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12
2025-01-29T03:04:40Z INFO Settings:
├── DNS upstream connection: dot
├── DNS server listening address: :53
├── DNS over TLS:
| ├── Upstream resolvers: cloudflare and google
| └── Request timeout: 3s
├── Cache:
| └── Type: noop
├── Filtering:
| └── Blocked categories:
├── Logging:
| ├── Level: debug
| └── Caller: hidden
├── Middleware logging: disabled
├── Metrics:
| └── Type: noop
├── Local DNS middleware:
| └── Local resolvers:
| ├── 8.8.8.8:53
| ├── 8.8.4.4:53
| ├── [2001:4860:4860::8888]:53
| └── [2001:4860:4860::8844]:53
├── Substitute middleware: disabled
├── Check DNS: no
└── Periodic update: every 24h0m0s
2025-01-29T03:04:40Z INFO using DNS address 127.0.0.1 internally
2025-01-29T03:04:40Z DEBUG [services] dns loop starting
2025-01-29T03:04:40Z INFO [DNS server loop] IPv6 is supported, communicating with upstream resolvers only over IPv6
2025-01-29T03:04:40Z INFO [DNS server loop] starting DNS server
2025-01-29T03:04:40Z INFO [DNS over TLS] DNS server listening on [::]:53
2025-01-29T03:04:40Z INFO [DNS server loop] downloading and building DNS block lists
2025-01-29T03:04:40Z INFO [DNS server loop] 0 hostnames blocked overall
2025-01-29T03:04:40Z INFO [DNS server loop] 0 IP addresses blocked overall
2025-01-29T03:04:40Z INFO [DNS server loop] 0 IP networks blocked overall
2025-01-29T03:04:40Z INFO [DNS server loop] starting DNS server
2025-01-29T03:04:40Z INFO [DNS over TLS] DNS server listening on [::]:53
2025-01-29T03:04:40Z DEBUG [services] dns loop started
2025-01-29T03:04:40Z DEBUG [services] dummy metrics server starting
2025-01-29T03:04:40Z DEBUG [services] dummy metrics server started
2025-01-29T03:04:40Z DEBUG [services] health http server starting
2025-01-29T03:04:40Z INFO [health server] health http server listening on 127.0.0.1:9999
2025-01-29T03:04:40Z DEBUG [services] health http server started
Example of plaintext leakage:
root@gl-mt6000:~# dig @172.17.0.2 tRaCKEr.ToRREnt.Eu.oRG
; <<>> DiG 9.18.28 <<>> @172.17.0.2 tRaCKEr.ToRREnt.Eu.oRG
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61232
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;tRaCKEr.ToRREnt.Eu.oRG. IN A
;; ANSWER SECTION:
tRaCKEr.ToRREnt.Eu.oRG. 15 IN A 91.216.110.53
;; Query time: 40 msec
;; SERVER: 172.17.0.2#53(172.17.0.2) (UDP)
;; WHEN: Wed Jan 29 03:09:41 UTC 2025
;; MSG SIZE rcvd: 89
root@gl-mt6000:/mnt/infra/wrt/dns# tcpdump -ni docker0 port 53
03:09:41.480317 IP 172.17.0.1.51485 > 172.17.0.2.53: 61232+ [1au] A? tRaCKEr.ToRREnt.Eu.oRG. (63)
03:09:41.480876 IP 172.17.0.2.37505 > 8.8.8.8.53: 61232+ [1au] A? tRaCKEr.ToRREnt.Eu.oRG. (63)
03:09:41.521499 IP 8.8.8.8.53 > 172.17.0.2.37505: 61232 1/0/1 A 91.216.110.53 (67)
03:09:41.521751 IP 172.17.0.2.53 > 172.17.0.1.51485: 61232 1/0/1 A 91.216.110.53 (89)
REPOSITORY TAG IMAGE ID CREATED SIZE
qmcgaw/dns v2.0.0-beta 0d7752670a16 2 months ago 15.2MB
qmcgaw/dns latest d2248e987c3d 3 years ago 20MB
root@gl-mt6000:~#
Howdy, I am witnessing plaintext DNS queries being sent out despite setting
UPSTREAM_TYPE=DoT
. The overwhelming majority of queries are via DoT but quite a few are being sent plaintext.Just wondering if I've got some configuration wrong. I can't see any option to disable plaintext as the
PLAIN_RESOLVERS
environment variable does not have an option to disable, however I would assume that withUPSTREAM_TYPE=DoT
thatPLAIN_RESOLVERS
is not applicable.Expected behaviour:
When setting
UPSTREAM_TYPE=DoT
, only DoT queries should ever be sent to upstreams. Plaintext queries should never be sent under any conditions.Observed behaviour:
Sometimes plaintext queries are sent. See packet captures and logs
In the below packet captures,
172.17.0.1 - client
172.17.0.2 and 2400:a840:405b:13a0:0:242:ac11:2 - dns server container (this project)
docker-compose file:
Example of plaintext leakage:
Example of correct working DoT query
Cheers!
The text was updated successfully, but these errors were encountered: