How to audit a consumer vpn for leaks and telemetry using wireguard and protonvpn

How to audit a consumer vpn for leaks and telemetry using wireguard and protonvpn

I recently spent a weekend auditing a couple of consumer VPN setups—one based on WireGuard, one using the ProtonVPN client—to answer the question I get a lot: "How can I check a VPN for leaks and hidden telemetry without becoming a reverse‑engineering expert?" I wanted something practical you can reproduce with open tools and a modest amount of time. Below I walk you through the tests I run, why they matter, and concrete commands and techniques that work on a Linux desktop. I’ll call out differences between a simple WireGuard user configuration and a more full‑featured client like ProtonVPN.

What I’m trying to discover

When I audit a VPN I’m focused on a few concrete outcomes:

  • Does traffic ever bypass the VPN tunnel? (IP leaks, IPv6 leaks, split tunneling surprises)
  • Are DNS queries going to the VPN provider (or to my ISP)?
  • Is there observable telemetry—background connections from the client or binary to third‑party endpoints?
  • Does the kill‑switch actually block traffic if the tunnel drops?
  • These are the pragmatic risks for most users. Advanced forensic tracing of intentionally obfuscated telemetry is possible but rare for mainstream clients; the tests below catch most common misconfigurations and suspicious behaviour.

    Baseline environment and tools

    My test machine is a Linux laptop. Tools I rely on:

  • tcpdump and tshark (command‑line packet captures)
  • Wireshark (GUI for packet analysis)
  • nft or iptables (verify packet filtering/kill‑switch)
  • ip and wg (WireGuard status)
  • strace or lsof (see what network sockets a process opens)
  • nsenter / network namespaces or firejail (isolate and observe application network behaviour)
  • If you’re on macOS or Windows, equivalents exist (Packet Capture, tcpdump, Sysinternals Process Explorer), but commands will differ. For ProtonVPN, I test both the GUI/daemon and the low‑level system behaviour produced by their client.

    Step 1 — Establish a reproducible baseline

    Before enabling any VPN, I record what my IP addresses, DNS servers and interfaces look like. This gives me a baseline to detect leaks.

    Commands I run:

  • ip addr show
  • ip -6 addr show
  • resolvectl status OR cat /etc/resolv.conf
  • curl --silent https://ifconfig.co && curl --silent https://ifconfig.co/hostname
  • Save the outputs to a file (e.g. baseline.txt). Also run a quick tcpdump to capture any background chatter for a minute:

  • sudo tcpdump -i any -w baseline.pcap -G 60 -W 1
  • Step 2 — WireGuard: config check and behavioral tests

    If you’re using a simple WireGuard configuration (wg-quick or a home server), start by inspecting the config file.

  • Look for AllowedIPs entries. If AllowedIPs = 0.0.0.0/0, ::/0, the tunnel should carry all traffic. If only specific subnets are present, you likely have split tunneling.
  • Check DNS options in wg-quick or systemd-resolved integration—WireGuard itself doesn’t set system DNS unless helper scripts do.
  • Bring up the interface:

  • sudo wg-quick up wg0
  • Then monitor traffic:

  • sudo tcpdump -i wg0 -w wg0.pcap &
  • sudo tcpdump -i eth0 or -i wlan0 -w physical.pcap &
  • You should see your traffic on wg0 and very little on the physical interface after tunnel is up. If you still see HTTP/DNS from your user processes on the physical interface, you have a leak.

    Step 3 — DNS and WebRTC leaks

    DNS is the most common leak. If your resolver doesn’t get routed into the VPN, your ISP sees your lookups. To test:

  • Enable the VPN.
  • Run: dig @resolver1.opendns.com whoami.opendns.com +short
  • curl -s https://1.1.1.1/cdn-cgi/trace | grep ip
  • Also check DNS queries in a capture (filter by port 53 or by DNS protocol in Wireshark). For WebRTC leaks from a browser, I use a private tab and run a JavaScript test page (there are several) while watching packet capture to see whether STUN requests go via the tunnel.

    Step 4 — IPv6: the silent leak

    Many consumer VPNs and clients don’t handle IPv6 well and simply ignore it, letting traffic flow outside the tunnel. Test IPv6 enabling/disabling:

  • Check ip -6 addr until VPN is up.
  • curl -6 -s https://ifconfig.co || echo "No IPv6 via tunnel"
  • If you see an IPv6 public address that’s not from the VPN, you have an IPv6 leak. The safe immediate fix is to disable IPv6 locally (sysctl or NetworkManager) until the provider supports it.

    Step 5 — Kill switch testing

    A good kill switch should block any non‑VPN traffic if the tunnel drops. Test it by simulating a tunnel failure:

  • Bring up the VPN, start a long TCP transfer (curl a large file).
  • Bring down the tunnel: sudo wg-quick down wg0 or kill the ProtonVPN daemon process.
  • Watch packet captures and iptables/nft rules.
  • If traffic continues on the physical interface, the kill switch failed. For WireGuard setups you can implement policy routing and firewall rules that drop traffic not sent via the wg interface. For ProtonVPN their Linux client exposes a kill switch option—verify behavior by force‑killing the daemon and observing whether the system firewall persists.

    Step 6 — Detecting telemetry and background connections

    Telemetry is often small DNS requests or HTTPS POSTs from the client or bundled binaries. To find it I combine process monitoring and packet capture.

  • Start a capture on the physical interface before starting the VPN client: sudo tcpdump -i any -w telemetry.pcap
  • Launch the client and let it run for a few minutes.
  • Use lsof -i -n -P to list sockets opened by the client process, and strace -f -e trace=network -p to see network syscalls in real time.
  • In ProtonVPN’s case, I watched the daemon create TLS connections to a handful of domains after startup—these can be support/telemetry endpoints, subscription checks, or VPN control plane. Cross‑reference domains with open data (whois, reverse DNS). Small background DNS queries to analytics domains are a red flag.

    Using network namespaces to isolate and observe

    One of my favorite tests is to run an application inside a network namespace that has only the VPN interface. That way, if the app manages to leak outside, it’s a bug in the VPN or tunnel routing.

  • ip netns add vpn-ns
  • ip link set dev wg0 netns vpn-ns
  • ip netns exec vpn-ns curl https://ifconfig.co
  • This helps separate host‑level telemetry from what the app itself is doing.

    Quick reference: tests, tools and what to look for

    TestTool/CommandWhat indicates a problem
    IP leakcurl https://ifconfig.coPublic IP on physical interface, not VPN IP
    DNS leaktcpdump port 53, digQueries sent to ISP/third‑party resolvers
    IPv6 leakcurl -6 https://ifconfig.coPublic IPv6 reachable outside tunnel
    Kill switchBring tunnel down while transfer activeTraffic continues on physical interface
    Telemetrystrace, lsof, tcpdumpUnexpected connections to analytics/control domains

    When I test ProtonVPN specifically, I combine their GUI/daemon behaviour checks with the same packet captures. Proton is transparent about a no‑logs policy, but client behaviour still matters—does it phone home? Are connections encrypted and tethered to the VPN control plane only? I found it useful to run the Proton client with debug logging enabled and correlate with my packet captures.

    Finally, one important note: some telemetry or control plane connections are legitimate (e.g., certificate revocation checks, update checks). The audit goal is to be able to explain each connection, not to assume all background traffic is malicious. The combination of strace/lsof to find the originating process and tcpdump/Wireshark to inspect destination and content (SNI, certs, query names) lets you make that call.


    You should also check the following news:

    Gadgets

    which inexpensive USB-C docks actually preserve MacBook Pro charging and external display stability under high GPU load? hands-on tests

    29/07/2026

    I spent the past two weeks running a practical, hands‑on comparison of inexpensive USB‑C docks to answer a simple but frustrating question: which...

    Read more...
    which inexpensive USB-C docks actually preserve MacBook Pro charging and external display stability under high GPU load? hands-on tests