Skip to content
Contents
GuidesOpenWrt

What can your ISP still see with DoH? DNS queries, destination IPs and TLS SNI

Inspect a destination address and plaintext server name in an ordinary TLS handshake, then identify what ECH changes and what remains visible.

Switching the upstream DNS on OpenWrt to DoH changes the connection from the gateway to the resolver. Someone observing the link can still see destination addresses, timing and traffic volume. The resolver receives the queries it answers. To find out whether the website name is visible, look separately at the browser's connection to the website.

Separate the two connections

On a device you manage, open a test website. Note the upstream endpoint of the gateway's DNS proxy and the address the browser actually contacts. One HTTPS connection carries DNS messages. The website connection negotiates TLS. An ordinary ClientHello usually includes SNI so a server sharing an IP can select the site. A client connecting directly to a numeric address can still send a server name.

ECH puts the actual server name and other parameters inside an encrypted inner ClientHello. It requires support from the client and server and a suitable configuration. The outer ClientHello may contain a public name, and the destination IP remains visible. Many sites can share one CDN address, so an IP alone rarely identifies a particular page. SNI does not reveal URL paths, search terms or form contents.

Interpret one observed handshake

On your own isolated network, give an ordinary TLS connection a distinctive test server name and capture only that connection. Finding the string in handshake packets shows that the name was visible at that observation point. If it is absent, check the capture interface, the start of the handshake, QUIC, caches and connection reuse. Its absence alone cannot prove ECH succeeded. Test ECH with a compatible endpoint and verify negotiation in the browser or on the server.

At home, check that an uncached system query reaches the intended encrypted proxy. Then inspect the browser's actual TLS connection to the website. Legacy upstream exceptions, a browser's own DoH and a VPN can change the path you observe. Stop the temporary capture when finished and keep only the findings you need. Trace DNS leaks after enabling DoH on OpenWrt

Find the chosen server name in an ordinary TLS handshake

The recording has English narration and optional English and Chinese subtitles. The test client at 192.168.71.10 contacted the LuCI HTTPS port of an isolated OpenWrt 25.12.6 router by numeric address and supplied window.lab.test as the server name. That name appeared in the six packets captured on the bridge. This was a LAN-side TLS 1.2 handshake. The recording contains no household WAN traffic or ECH handshake.

First check the version and interface in an SSH session on the lab router. Then exit to the Linux client.

ubus call system board | jsonfilter -e '@.release.description'
ip link show br-lan
exit

Run the following commands on the Linux client with an SSH configuration for the router, GNU timeout, OpenSSL, tcpdump and grep. The lab uses /lab/ssh.conf. Substitute your own SSH configuration, bridge, wired client address and router HTTPS address. Pick an unused source port and use the same number in both commands. Start the capture and wait for the listening message before connecting.

cd "$(mktemp -d)"
timeout --foreground 25 ssh -n -F /lab/ssh.conf -l root 192.168.71.1 \
  "tcpdump -U -ni br-lan -s 0 -c 6 -w - 'tcp port 16456 and tcp port 443'" \
  >one.pcap 2>capture.log &
cap=$!
cat capture.log
openssl s_client -connect 192.168.71.1:443 -bind 192.168.71.10:16456 \
  -servername window.lab.test -tls1_2 -brief </dev/null
wait "$cap"
cat capture.log
tcpdump -nn -r one.pcap | head -4
LC_ALL=C grep -aoF window.lab.test one.pcap

Check three results from the recording: TLSv1.2 in the handshake, 6 packets captured when the capture finishes, and window.lab.test read from the file. The router used a self-signed certificate and its warning remains visible. No credentials were entered. The capture stops after the requested packets and the client imposes a 25-second limit. Remove the test files you created when finished.

Reference

Reference

Check the model, region and hardware revision on the label before selecting firmware.

Explore hardware

Comments