Privacy Tools Guide

Verify your VPN isn’t leaking DNS requests using online test tools like dnsleaktest.com—if you see your ISP’s servers in results instead of your VPN provider’s, your browsing history is exposed. Fix IPv6 leaks, misconfigured split tunneling, and default gateway issues to ensure complete DNS protection.

What Exactly is a DNS Leak?

Every time you visit a website, your computer needs to translate a human-readable domain name (like example.com) into an IP address. This translation happens through DNS (Domain Name System) servers. Normally, when you’re not using a VPN, your device sends DNS queries to your ISP’s DNS servers, giving them a complete log of every website you visit.

When you connect to a VPN, the expectation is that all your DNS queries get routed through the VPN’s encrypted tunnel to the VPN provider’s DNS servers. Your ISP shouldn’t see any of this traffic. However, due to various technical issues, your device might inadvertently send some DNS queries outside the VPN tunnel—directly to your ISP or other third-party DNS servers. This is a DNS leak.

The danger is real: even with military-grade encryption on your VPN traffic, a DNS leak exposes your browsing history. Your ISP knows exactly which domains you visited, defeating the purpose of using a VPN for privacy.

Why Do DNS Leaks Happen?

Several factors can cause DNS leaks:

IPv6 Compatibility Issues: IPv6 is the newer internet protocol, but many VPNs don’t properly handle IPv6 traffic. If your device prefers IPv6 and your VPN only routes IPv4, your DNS queries for IPv6 addresses can leak outside the tunnel.

Default Gateway Problems: Some operating systems have a default gateway configuration that doesn’t properly route all traffic through the VPN. This is particularly common on Windows.

Split Tunneling Misconfiguration: When only certain apps use the VPN while others bypass it, DNS queries from non-VPN apps can leak.

VPN Protocol Weaknesses: Some VPN protocols have known issues that can cause leaks under certain network conditions.

How to Test for DNS Leaks

Testing for DNS leaks is straightforward. Here’s how to do it:

Method 1: Using Online DNS Leak Test Services

The easiest approach is using dedicated DNS leak test websites:

  1. Connect to your VPN
  2. Visit a DNS leak test site like dnsleaktest.com or ipleak.net
  3. Run the extended test

What to look for: The test results should show DNS servers that belong to your VPN provider, not your ISP. If you see your ISP’s servers or servers in your physical location, you have a DNS leak.

Method 2: Manual DNS Check

You can also verify which DNS servers your system is using:

On macOS/Linux:

# Check current DNS servers
scutil --dns | grep 'nameserver'

# Or use nslookup to see which server resolves a query
nslookup example.com

On Windows:

ipconfig /all | findstr "DNS Servers"

Compare the DNS servers shown with what your VPN provider advertises. If they don’t match, you have a leak.

Method 3: Using Terminal Commands for Detailed Analysis

For more thorough testing, use these commands:

On macOS:

# Monitor DNS queries in real-time
sudo tcpdump -i any -n port 53

This shows all DNS queries leaving your system. With a properly working VPN, you should only see queries going to your VPN’s DNS servers.

On Linux:

# Use dig to test specific DNS servers
dig @dns-server-ip example.com

# Or check current DNS configuration
cat /etc/resolv.conf

Fixing DNS Leaks

If you’ve detected a DNS leak, here’s how to fix it:

1. Enable DNS Leak Protection in Your VPN

Most reputable VPN apps have built-in DNS leak protection. Check your VPN settings:

2. Configure Your Operating System

You can force your system to use specific DNS servers:

On Windows:

  1. Go to Network & InternetWi-Fi or Ethernet
  2. Click on your connection → Hardware properties
  3. Scroll to DNS server assignment and select Manual
  4. Enter your VPN provider’s DNS servers

On macOS:

  1. Go to System SettingsNetworkWi-Fi (or Ethernet)
  2. Click DetailsDNS
  3. Add your VPN provider’s DNS servers

On Linux (NetworkManager):

  1. Edit your connection settings
  2. Go to IPv4 Settings or IPv6 Settings
  3. Set DNS servers to your VPN provider’s addresses

3. Disable IPv6

If your VPN doesn’t support IPv6, disabling it is the safest approach:

On Windows:

# Disable IPv6 on all interfaces
netsh interface ipv6 install
netsh int ipv6 set interface interface_index disabled

On macOS:

# Disable IPv6
networksetup -listallnetworkservices
# Note your network service name, then:
networksetup -setv6off "Wi-Fi"

On Linux: Add this to /etc/sysctl.conf:

# Disable IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

Then apply with sudo sysctl -p

4. Use a Firewall with VPN Kill Switch

A VPN kill switch blocks all internet traffic if the VPN connection drops, preventing any accidental leaks:

5. Switch VPN Protocols

Some protocols are more prone to leaks than others. Try switching:

Avoid PPTP or older protocols that have known security issues.

Testing After Fixes

After implementing fixes, verify your VPN is no longer leaking:

  1. Disconnect and reconnect your VPN
  2. Clear your browser cache
  3. Run multiple DNS leak tests from different services
  4. Use the terminal command method to monitor actual DNS queries

Repeat tests at different times of day and on different networks to ensure the fix is consistent.

What to Do If Your VPN Still Leaks

If you’ve tried everything and your VPN still leaks:

  1. Contact your VPN provider: They may have specific fixes for your configuration
  2. Consider an alternative VPN: Some providers simply don’t implement proper leak protection
  3. Use system-level DNS over HTTPS (DoH): While not a perfect solution, routing DNS through HTTPS can add a layer of protection
  4. Try a privacy-focused Linux distribution: Some distros like Tails or Whonix have built-in leak protection

Best Practices for DNS Privacy

Beyond fixing leaks, consider these additional measures:

Built by theluckystrike — More at zovo.one