-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Output of the following commands:
./dnscrypt-proxy -version
2.0.45
./dnscrypt-proxy -check
<no output>
./dnscrypt-proxy -resolve example.com
Resolving [example.com] using [10::dead:cafe] port 5354
Resolver : 172.253.5.129
Canonical name: example.com.
IPv4 addresses: 93.184.216.34
IPv6 addresses: -
Name servers : a.iana-servers.net., b.iana-servers.net.
DNSSEC signed : yes
Mail servers : 1 mail servers found
HTTPS alias : -
HTTPS info : -
Host info : -
TXT records : v=spf1 -all, wgyf8z8cgvm2qmxpnbnldrcltvk4xqfn
What is affected by this bug?
The tls_cipher_suite
seems to be doing nothing: I have configured the TLS_RSA_WITH_RC4_128_SHA
algorithm (0x0005
in hex), which should not be compatible neither with cloudflare
or google
but the connection still works. Moreover, the used suite does not even match the one I requested.
When does this occur?
When configuring the DNSCrypt
service, having a look at the journal logs, everything seems to be working fine whereas it should not.
How do we replicate the issue?
Place the following configuration:
server_names = ['cloudflare', 'google']
listen_addresses = ['[10::dead:cafe]:5354','192.168.122.2:5353']
max_clients = 250
user_name = '_dnscrypt-proxy'
ipv4_servers = true
ipv6_servers = false
dnscrypt_servers = false
doh_servers = true
require_dnssec = false
require_nolog = false
require_nofilter = false
force_tcp = false
timeout = 5000
keepalive = 30
lb_strategy = 'p2'
log_level = 0
use_syslog = true
cert_refresh_delay = 240
tls_cipher_suite = [5]
fallback_resolvers = ['192.168.122.1:53']
ignore_system_dns = true
netprobe_timeout = 60
netprobe_address = '9.9.9.9:53'
block_ipv6 = true
cache = false
[local_doh]
listen_addresses = ['[::]:3000']
path = '/dns-query'
cert_file = '/var/dnscrypt-proxy/server.crt'
cert_key_file = '/var/dnscrypt-proxy/private.key'
[query_log]
format = 'tsv'
[nx_log]
format = 'tsv'
[sources]
[sources.public-resolvers]
urls = ['https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md', 'https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md']
cache_file = '/var/cache/dnscrypt-proxy/public-resolvers.md'
minisign_key = 'RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3'
refresh_delay = 72
prefix = ''
[broken_implementations]
fragments_blocked = ['cisco', 'cisco-ipv6', 'cisco-familyshield', 'cisco-familyshield-ipv6', 'cleanbrowsing-adult', 'cleanbrowsing-adult-ipv6', 'cleanbrowsing-family', 'cleanbrowsing-family-ipv6', 'cleanbrowsing-security', 'cleanbrowsing-security-ipv6']
[doh_client_x509_auth]
Very probably it is needed to tweak the configuration to adjust IP addresses. I am running dnscrypt-proxy
inside a VM running Debian. The version is the one available on bullseye. There is a DoH server configured for the instance too. However, I suppose it should not affect.
The logs I get are:
Mar 29 11:24:11.192725 osdx dnscrypt-proxy[28598]: dnscrypt-proxy 2.0.45
Mar 29 11:24:11.192974 osdx dnscrypt-proxy[28598]: Network connectivity detected
Mar 29 11:24:11.230876 osdx dnscrypt-proxy[28598]: Now listening to [10::dead:cafe]:5354 [UDP]
Mar 29 11:24:11.231802 osdx dnscrypt-proxy[28598]: Now listening to [10::dead:cafe]:5354 [TCP]
Mar 29 11:24:11.231831 osdx dnscrypt-proxy[28598]: Now listening to 192.168.122.2:5353 [UDP]
Mar 29 11:24:11.231846 osdx dnscrypt-proxy[28598]: Now listening to 192.168.122.2:5353 [TCP]
Mar 29 11:24:11.232822 osdx dnscrypt-proxy[28598]: Now listening to https://[::]:3000/dns-query [DoH]
Mar 29 11:24:11.233895 osdx dnscrypt-proxy[28598]: Source [public-resolvers] loaded
Mar 29 11:24:11.235040 osdx dnscrypt-proxy[28598]: Firefox workaround initialized
Mar 29 11:24:11.350670 osdx dnscrypt-proxy[28598]: [cloudflare] TLS version: 304 - Protocol: h2 - Cipher suite: 4865
Mar 29 11:24:11.350853 osdx dnscrypt-proxy[28598]: [cloudflare] OK (DoH) - rtt: 7ms
Mar 29 11:24:11.429428 osdx dnscrypt-proxy[28598]: [google] TLS version: 304 - Protocol: h2 - Cipher suite: 4865
Mar 29 11:24:11.429473 osdx dnscrypt-proxy[28598]: [google] OK (DoH) - rtt: 15ms
Mar 29 11:24:11.429480 osdx dnscrypt-proxy[28598]: Sorted latencies:
Mar 29 11:24:11.429498 osdx dnscrypt-proxy[28598]: - 7ms cloudflare
Mar 29 11:24:11.429500 osdx dnscrypt-proxy[28598]: - 15ms google
Mar 29 11:24:11.429503 osdx dnscrypt-proxy[28598]: Server with the lowest initial latency: cloudflare (rtt: 7ms)
Mar 29 11:24:11.429507 osdx dnscrypt-proxy[28598]: dnscrypt-proxy is ready - live servers: 2
Expected behavior (i.e. solution)
The service gets a TLS error and refuses to connect to the upstream servers. Therefore, the service fails.
Other Comments
I have tweaked the Debian service to not use the SystemD socket and therefore, behave exactly the same as a manually launched application. The service unit is:
# /etc/systemd/system/dnscrypt-proxy.service
[Unit]
Description=DNSCrypt client proxy
Documentation=https://github.com/jedisct1/dnscrypt-proxy/wiki
After=network.target
Before=nss-lookup.target
Wants=nss-lookup.target
[Install]
WantedBy=multi-user.target
[Service]
NonBlocking=true
ExecStart=/usr/sbin/dnscrypt-proxy -config /etc/dnscrypt-proxy/dnscrypt-proxy.toml
ProtectHome=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectControlGroups=true
MemoryDenyWriteExecute=true
CacheDirectory=dnscrypt-proxy
LogsDirectory=dnscrypt-proxy
RuntimeDirectory=dnscrypt-proxy