Encrypted DNS Leaks: Network TAP & Wireshark Guide

Encrypted DNS Leaks: Network TAP & Wireshark Guide

Encrypted DNS Leaks: Network TAP + Wireshark Traffic Analysis

Seven detailed guides for understanding DNS leaks, DoH, DoT, QUIC, Network TAPs and safe packet analysis with Wireshark.

Network TAP connected to Wireshark for encrypted DNS traffic analysis

Network TAP and Wireshark monitoring architecture.

How to Use This Seven-Part Series

This series explains how encrypted DNS works and how a Network TAP can be used to observe the network behaviour surrounding DNS resolution without pretending that encrypted DNS payloads are visible when they are not.

The examples are intended for networks, devices and traffic that you own or are authorised to monitor. A passive TAP copies traffic for analysis; it does not automatically decrypt TLS, HTTPS or other encrypted application data.

Important distinction: A TAP can show metadata such as IP addresses, ports, packet timing, connection attempts and protocol characteristics. It normally cannot reveal the contents of DoH or DoT simply because those packets were captured.

The Seven Articles

  1. Understanding Encrypted DNS and What a DNS Leak Actually Means
  2. Building a Safe Network TAP and Wireshark Monitoring Point
  3. Finding Plaintext DNS Leaks with Wireshark
  4. Identifying DNS-over-TLS and DNS-over-HTTPS Traffic
  5. Understanding DoH, HTTP/3 and QUIC Visibility
  6. Investigating DNS Bypass, Resolver Mismatch and Policy Leaks
  7. Building a Repeatable Encrypted DNS Leak Testing Lab

Article 1: Understanding Encrypted DNS and What a DNS Leak Actually Means

The foundations: DNS, plaintext resolution, DoT, DoH and the difference between encryption and privacy.

What DNS Does

The Domain Name System translates names such as www.example.com into network addresses. A device normally needs DNS before it can establish many application connections.

Traditional DNS commonly uses UDP port 53 and can also use TCP port 53. Those packets can expose queried names to devices that can observe the traffic path.

What Makes DNS Encrypted?

DNS-over-TLS, usually called DoT, carries DNS through a TLS connection commonly associated with TCP port 853. DNS-over-HTTPS, or DoH, carries DNS messages inside HTTPS, commonly using TCP 443 or HTTP/3 over UDP 443.

Method Typical Transport Can a TAP Read the DNS Name?
Plain DNS UDP/TCP 53 Often yes
DoT TLS/TCP 853 Normally no
DoH HTTPS/TCP 443 Normally no
DoH over HTTP/3 QUIC/UDP 443 Normally no

What Is a DNS Leak?

A DNS leak generally means DNS resolution is happening outside the resolver, tunnel or policy boundary that the administrator intended to control. For example, a device might be expected to use the network's resolver but independently contact an external resolver.

Encryption alone does not tell you whether the resolver is authorised. A DoH connection can be encrypted and still bypass a network DNS policy.

Key idea: When investigating leaks, ask two separate questions: “Is the DNS content encrypted?” and “Is the DNS resolver path authorised?” They are not the same question.

What the TAP Contributes

  • Visibility into plaintext DNS packets, if they cross the monitored link.
  • Visibility into encrypted connection endpoints and ports.
  • Packet timing and connection frequency.
  • Evidence that a client is contacting an unexpected resolver or service.
  • A packet-level record that can be correlated with endpoint logs.

Article 2: Building a Safe Network TAP and Wireshark Monitoring Point

How to place the TAP, connect the monitoring computer and capture traffic without becoming part of the data path.

Recommended Architecture

Internet / Fibre

↓

ONU / ONT

↓

Passive Network TAP

↓

Router / Firewall

↓

Managed Switch → Clients

Separate TAP monitor port → Capture PC → Wireshark

Why Use a TAP?

A passive Ethernet TAP creates a monitoring copy of traffic while the normal network connection continues through the inline ports. The capture workstation connects to the TAP's monitor output rather than becoming a router or bridge.

Physical Connections

  1. Connect the upstream network device to the TAP input.
  2. Connect the downstream router or firewall to the TAP output.
  3. Connect the TAP monitor port to the capture PC.
  4. Give the capture interface only the configuration needed for monitoring.
  5. Start Wireshark and select the dedicated capture interface.
Monitoring principle: The capture PC does not need to participate in the production network just to observe packets. Keep management and capture functions separate where practical.

Start a Wireshark Capture

Open Wireshark, select the Ethernet interface connected to the TAP monitor port and begin a capture. Generate test traffic from a device you control so the packet trace has a known starting point.

Useful first filters include:

dns
tcp.port == 53 || udp.port == 53
tcp.port == 853
tcp.port == 443
udp.port == 443
quic

Capture Scope

For a clean lab, capture only the traffic required for the test and avoid storing unnecessary personal or sensitive traffic. Packet captures can contain metadata and, where protocols are unencrypted, application content.

Article 3: Finding Plaintext DNS Leaks with Wireshark

A practical packet-analysis workflow for discovering clients that still send DNS outside the expected resolver path.

Step 1: Find DNS Packets

Use the Wireshark display filter dns. This limits the displayed packets to traffic identified as DNS.

dns

Step 2: Look for UDP or TCP Port 53

Traditional DNS is commonly associated with port 53. The following filter makes the transport condition explicit:

udp.port == 53 || tcp.port == 53

Step 3: Identify the Client

Inspect the source address of each DNS request. Compare it with your known device inventory or DHCP leases. Then inspect the destination address to determine which resolver received the request.

Observation What It Can Mean
Client → approved resolver Expected plaintext DNS path, if plaintext DNS is permitted
Client → unexpected external IP:53 Possible DNS policy bypass or unmanaged configuration
No port 53 traffic Could indicate encrypted DNS, caching, or simply no DNS activity during the capture

Step 4: Inspect a Request

Select a DNS packet and expand the DNS section in the packet details pane. In plaintext DNS, fields such as the queried name, query type and response information may be visible.

Step 5: Establish Whether It Is a Leak

Do not label every external DNS packet a leak automatically. First define the intended policy. A public resolver may be intentionally configured. A VPN client may also have its own resolver requirements.

Evidence rule: A packet capture demonstrates what crossed the monitored link. It does not by itself prove why a device made the connection. Correlate the capture with endpoint settings, DHCP information and network policy.

Useful Investigation Filters

  • dns — show DNS protocol traffic.
  • dns.flags.response == 0 — focus on DNS queries.
  • dns.flags.response == 1 — focus on DNS responses.
  • ip.addr == 192.168.1.20 && dns — examine one client.
  • ip.dst == 8.8.8.8 && dns — examine DNS sent to a specific destination.

Article 4: Identifying DNS-over-TLS and DNS-over-HTTPS Traffic

How to recognise encrypted DNS without claiming that Wireshark can magically decrypt it.

DNS-over-TLS

DoT commonly uses TCP port 853 and establishes a TLS session before DNS messages are exchanged. A TAP can therefore show the client-to-server connection and TLS handshake metadata, but the DNS query itself is normally encrypted.

tcp.port == 853

DNS-over-HTTPS

DoH normally uses HTTPS and therefore blends DNS activity into ordinary web-style encrypted traffic. A simple port filter may show TCP 443 connections, but many other applications also use TCP 443.

tcp.port == 443

Why Port 443 Is Not Proof of DoH

A connection to port 443 is not automatically DNS-over-HTTPS. It could be a website, software update, API call, telemetry service or many other HTTPS applications.

For a defensible investigation, combine packet metadata with endpoint configuration, known resolver addresses, browser settings and, where available, resolver-side logs.

What a TAP Can Still Reveal

  • Client and destination IP addresses.
  • Transport protocol and port.
  • Connection start and end timing.
  • Packet sizes and direction.
  • TLS handshake characteristics where visible.
  • Repeated connections to a known DNS provider endpoint.

What It Normally Cannot Reveal

  • The plaintext DNS question inside DoT.
  • The plaintext DNS question inside DoH.
  • HTTPS application content protected by TLS.
  • Passwords, cookies or private messages protected by encryption.
Professional interpretation: “The capture shows an encrypted connection to an endpoint associated with DNS service” is a defensible observation. “The capture shows the exact DNS name queried” is not valid unless you have an authorised method that provides the decrypted data.

Article 5: Understanding DoH, HTTP/3 and QUIC Visibility

Why modern encrypted DNS can look very different from traditional DNS traffic.

From TCP 443 to UDP 443

Modern applications can use HTTP/3, which operates over QUIC. QUIC normally uses UDP, commonly including UDP port 443. This means an encrypted DNS service can appear as UDP traffic rather than the familiar TCP-based HTTPS connection.

udp.port == 443
quic

Why This Matters for Leak Testing

A monitoring design that only searches for UDP/TCP 53 can miss encrypted DNS completely. The absence of plaintext DNS packets does not prove that a device is using the resolver you intended.

For example, a client may send no port-53 DNS traffic because the browser or operating system is using an encrypted resolver over HTTPS or HTTP/3.

Build a Protocol Inventory

Traffic Typical Indicator Interpretation
Plain DNS UDP/TCP 53 DNS contents may be visible
DoT TCP 853 + TLS Encrypted DNS session
DoH TCP 443 + HTTPS DNS blended into HTTPS
HTTP/3 UDP 443 + QUIC Encrypted HTTP over QUIC

Do Not Over-Interpret IP Addresses

An IP address can host multiple services or domains, and service providers can change infrastructure. Use current endpoint documentation, controlled test conditions and corroborating evidence rather than assuming that an IP alone identifies a specific DNS query.

Controlled Test

  1. Start a TAP capture.
  2. Record the client address under test.
  3. Generate a small, known amount of DNS activity.
  4. Stop unrelated applications where possible.
  5. Compare port 53, 853, TCP 443 and UDP 443 observations.
  6. Compare the capture with the endpoint's configured DNS settings.

Article 6: Investigating DNS Bypass, Resolver Mismatch and Policy Leaks

Turning packet observations into a structured investigation without confusing encryption with compliance.

Define the Expected Policy First

Before opening Wireshark, document the intended DNS architecture. For example, clients may be expected to use a local resolver, which then forwards requests to approved upstream services.

Example policy:

  • Clients receive DNS settings from DHCP.
  • Clients send DNS to the internal resolver.
  • The internal resolver communicates with approved upstream services.
  • Direct external DNS from client VLANs is blocked or otherwise controlled.
  • Encrypted DNS is handled according to the organisation's documented policy.

Capture and Compare

Use the TAP to observe the boundary where the policy should apply. Then compare the observed destination addresses and protocols with the documented architecture.

Example Investigation Matrix

Client Behaviour Possible Explanation Next Check
Client sends DNS to approved resolver Expected path Verify resolver policy
Client sends DNS to an unexpected external address Possible bypass Check endpoint configuration and firewall logs
Client creates TCP 853 sessions Possible DoT Identify destination and endpoint settings
Client creates repeated UDP 443 sessions Could be QUIC/HTTP/3 Correlate with application and known service endpoints

Wireshark Correlation Filters

ip.addr == 192.168.1.20
ip.addr == 192.168.1.20 && dns
ip.addr == 192.168.1.20 && tcp.port == 853
ip.addr == 192.168.1.20 && udp.port == 443
ip.addr == 192.168.1.20 && tcp.port == 443

Separate Evidence from Assumptions

A good incident or troubleshooting report should state exactly what the capture demonstrates. For example: “Host 192.168.1.20 established repeated encrypted sessions to destination X during the test.” If you infer that X is a DNS provider, document the source used for that attribution.

Best practice: Combine TAP data with DHCP leases, firewall logs, endpoint settings, browser configuration and resolver logs. No single packet capture answers every DNS question.

Article 7: Building a Repeatable Encrypted DNS Leak Testing Lab

A complete test methodology for homelabs, training environments and authorised network troubleshooting.

Lab Components

  • Router or firewall under your control.
  • Managed switch where appropriate.
  • Passive Ethernet Network TAP.
  • Capture PC running Wireshark.
  • One or more test clients.
  • A documented DNS policy.
  • Optional local resolver for controlled experiments.

Test A: Plain DNS Baseline

Configure a controlled test client to use a known DNS server. Start the TAP capture and perform several predictable lookups. Filter on dns and verify whether the expected DNS requests appear at the monitored point.

Test B: DoT

Configure the authorised test client to use a DoT resolver. Capture the traffic and filter for tcp.port == 853. You should expect to see an encrypted session rather than readable DNS questions.

Test C: DoH

Enable an authorised DoH configuration on the test client. Capture traffic while generating DNS lookups. Search for relevant encrypted HTTPS connections and correlate them with the client configuration. Do not assume every TCP 443 connection is DoH.

Test D: HTTP/3 and QUIC

Where the client and service support HTTP/3, examine udp.port == 443 and quic. This demonstrates why DNS monitoring based only on port 53 is incomplete.

Test E: Policy Enforcement

Apply your network's intended DNS controls, then repeat the tests. The purpose is to compare the observed traffic against the policy rather than to collect more traffic than necessary.

Example Test Record

Field Example
Test client 192.168.1.20
Capture point TAP between gateway and upstream network
Protocol Plain DNS / DoT / DoH / HTTP/3
Expected resolver Documented resolver or approved service
Observed destination Record from the capture
Result Matches policy / requires investigation

How to Report the Result

A professional report should include the capture location, client address, test time, protocol observed, destination information, Wireshark filters used and the evidence supporting the conclusion.

Avoid reporting encrypted traffic as though its payload were visible. If the payload is encrypted, explicitly say so and describe the metadata that was actually observed.

Repeatability matters: Run the same test more than once, control the applications generating traffic and preserve the exact filters and configuration used. This makes troubleshooting results much easier to verify.

Master Wireshark Workflow for DNS Leak Analysis

  1. Define the DNS policy and expected resolver path.
  2. Place the passive TAP at the appropriate network boundary.
  3. Connect the monitor port to the Wireshark capture PC.
  4. Start a time-limited packet capture.
  5. Identify the test client's IP address.
  6. Search for plaintext DNS on UDP/TCP 53.
  7. Search for DoT on TCP 853.
  8. Search for HTTPS on TCP 443 and correlate it with known configuration.
  9. Search for QUIC or UDP 443 where HTTP/3 is relevant.
  10. Compare observed destinations with the approved resolver list.
  11. Correlate the result with firewall, DHCP, endpoint and resolver logs.
  12. Document exactly what the packets prove and what remains uncertain.

Wireshark Filter Cheat Sheet

Filter Purpose
dns Display DNS protocol packets.
udp.port == 53 || tcp.port == 53 Find traditional DNS transport.
tcp.port == 853 Find likely DNS-over-TLS transport.
tcp.port == 443 Find TCP HTTPS traffic; not proof of DoH by itself.
udp.port == 443 Find UDP 443 traffic commonly associated with QUIC.
quic Display traffic decoded as QUIC.
ip.addr == 192.168.1.20 && dns Focus DNS analysis on one test client.

Security, Privacy and Data Handling

Packet captures should be treated as sensitive technical records. Depending on the protocols being monitored, a capture can contain IP addresses, hostnames, application metadata and, for unencrypted protocols, potentially application data.

  • Capture only authorised traffic.
  • Use short capture windows for troubleshooting.
  • Protect saved PCAP files with appropriate access controls.
  • Delete captures when they are no longer required.
  • Do not publish captures containing private information.
  • Use test devices and synthetic traffic for demonstrations where possible.
  • Document who is authorised to access the monitoring system.

Final Takeaways

A Network TAP is an excellent visibility point for authorised network troubleshooting because it provides a copy of traffic without requiring the Wireshark workstation to sit in the production forwarding path.

For encrypted DNS, however, the goal is not to “read encrypted DNS packets.” The useful objective is to determine which protocols, endpoints and traffic patterns are crossing the monitored boundary and whether those observations match the documented DNS policy.

Plain DNS can expose query details. DoT and DoH protect DNS contents, while modern HTTP/3 and QUIC can make encrypted DNS traffic look even less like traditional DNS. Combining TAP captures with endpoint, firewall and resolver information produces a much more reliable investigation.

Frequently Asked Questions

Can Wireshark decrypt DoH just because I have a TAP?

No. A passive TAP copies packets; it does not provide the cryptographic keys needed to decrypt TLS-protected application data.

Can a TAP detect a DNS leak?

It can provide evidence of DNS traffic crossing the monitored point, including plaintext DNS and encrypted connections. Whether that traffic is actually a leak depends on the network's intended policy.

Does no port 53 traffic mean DNS is secure?

No. DNS may be encrypted using DoT or DoH, DNS may be cached, or the capture may simply have missed the relevant traffic.

Is every connection to port 443 DoH?

No. Port 443 carries many forms of HTTPS traffic. DoH identification should be based on multiple pieces of evidence.

Why monitor UDP 443?

HTTP/3 uses QUIC over UDP, and encrypted application traffic including DNS-related HTTPS services can use modern HTTP/3 transports.

Where should the TAP be installed?

Place it at a boundary where the traffic you need to study actually crosses. In a home or lab environment, a TAP between the upstream connection and the router can provide useful WAN-side visibility, while a TAP or switch monitoring design elsewhere can provide LAN-side visibility.

Encrypted DNS Leak Analysis • Network TAP • Wireshark • DoT/DoH

Educational and authorised network-monitoring guide.

Why Networking?

Learning Networking is Fun and Beneficial For Future Careers, Projects or just as a hobby.

Discover The Joy of Understanding Hardware and Networking/Network Security and benefit from it now and start your career today!

About Me

Hi this is my Homelab Project that I had created back in November 2025!

I have been Networking for around 16 years, currently studying CompTIA. My goal & passion is to have a career in Network Engineering & Network Security.

Categories