---
title: "How to Check and Fix DNS Leaks Step by Step"
url: "https://astraguardvpn.com/blog/how-to-check-and-fix-dns-leaks-step-by-step"
description: "Step-by-step DNS leak test and fix guide for Windows, Mac, Linux, and mobile with a VPN."
updated: "2026-07-14T00:42:22.502Z"
---

# How to Check and Fix DNS Leaks Step by Step

A practical checklist to detect DNS leaks on Windows, macOS, Linux, Android, and iOS — then close them.

A practical checklist to detect DNS leaks on Windows, macOS, Linux, Android, and iOS — then close them. Before you start You need a working VPN connection, access to a DNS leak test site, and 10 minutes. Do not change network settings mid-test. Close bandwidth-heavy downloads so results stay clear. Windows DNS leak check Connect the VPN. Open PowerShell and run ipconfig /all . Confirm DNS servers are VPN-assigned, not your router. Run a web DNS leak test in Edge/Chrome/Firefox. If ISP DNS appears, flush cache with ipconfig /flushdns , reconnect VPN, retest. macOS DNS leak check Connect the VPN, then check System Settings → Network → your interface → Details → DNS. VPN DNS should appear while connected. Flush with sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder if stale results appear. Linux DNS leak check Use resolvectl status (systemd-resolved) or inspect /etc/resolv.conf . Confirm the VPN interface owns DNS. Avoid NetworkManager profiles that hardcode ISP DNS alongside the tunnel. Mobile checks On Android, review Private DNS settings; a fixed hostname can bypass VPN DNS. On iOS, prefer a full-tunnel profile and avoid Wi‑Fi Assist quirks by retesting after network changes. Permanent fixes Use AstraGuard configs that push DNS, enable kill switch where available, avoid split tunnel for privacy-critical apps, and retest after OS updates. Pair this with our DNS leak test guide . Command cheat sheet Windows: ipconfig /all , ipconfig /flushdns macOS: flush mDNSResponder; check DNS in System Settings Linux: resolvectl status or inspect /etc/resolv.conf When results disagree between browsers Browser DoH is the usual culprit. Align Secure DNS / TRR settings, relaunch the browser, and retest. System DNS leak tests and browser leak tests must both pass for a clean bill of health. Protect yourself with AstraGuard VPN AstraGuard VPN helps keep DNS inside the tunnel with strong encryption, kill switch options, and simple setup on desktop and mobile. Create an account , pick a plan on packages , then verify on privacy tools .

---

[More articles](https://astraguardvpn.com/blog) · [VPN plans](https://astraguardvpn.com/packages)
