Skip to content

How Do You Identify Which DNS Resolver macOS Uses During a VPN Session?

A practical routine for naming the DNS resolver that answers your Mac while a VPN session is active, using Terminal tools already on the machine and a few clean test lookups.

10 min readUpdated Nov 10, 2026By XPASS Editorial Team

How Do You Identify Which DNS Resolver macOS Uses During a VPN Session?

You connect the VPN on your Mac, the status looks healthy, and pages load. But one small question stays open: which DNS resolver is actually answering your lookups right now? The resolver decides who sees the list of site names you ask for, so it is worth knowing by name instead of by assumption. The good news is that macOS lets you read this information with tools that are already installed.

This article is about identification, not about fixing. We will build a short routine: record the resolver before the VPN, read the system's resolver list during the session, run one clean test lookup, and then interpret the result carefully. If what you find looks wrong, the companion guide on checking for DNS leaks on macOS covers causes and fixes in more depth.

Why the answer is not one simple address

On many systems you can imagine a single "DNS server" setting. macOS does not work that way. It keeps a set of resolver entries. Each entry has one or more nameserver addresses, a network interface it belongs to, an order or priority, and sometimes a list of domains it is limited to. When an app asks the system to look up a name, a background service called mDNSResponder picks the entry that matches best and sends the question there.

That is why "which resolver does my Mac use" has more than one honest answer. There may be a resolver for general lookups, another for a company domain that only applies to names ending in that domain, and another that was learned from the current Wi-Fi network and is lower in priority. During a VPN session, the aim is usually that general lookups follow the VPN, but you should verify that instead of trusting a green icon. A background explanation of the lookup chain is in the article on how DNS works.

It also helps to separate three things people mix up:

  • The resolvers the system lists (what the configuration says).
  • The resolver that actually answers a particular lookup (what happened on the wire).
  • The resolver an individual app uses when it ignores the system and talks to its own provider.

A solid check looks at the first two, and then asks whether any app belongs in the third group.

What you need before you start

You need a Mac, Terminal (found in Applications, Utilities), the VPN installed and able to connect, and about ten minutes. You do not need administrator rights for the read-only commands below. Nothing here changes your settings.

One note about the XPASS side. XPASS passes are used with VPNclient, a free app from the VPN supplier. The Mac version is an Intel-only installer that may ask for Rosetta on Apple silicon Macs. Because the way an app applies DNS can differ between versions and between Macs, this article does not promise a particular result. It gives you a way to look at your own Mac and read what it reports. If you have not set the app up yet, the macOS setup guide walks through it.

Step one: record the resolver before connecting

A comparison needs a baseline. Disconnect the VPN, make sure you are on your normal Wi-Fi or Ethernet, and open Terminal.

Run this command:

scutil --dns

The output is long. It has a section called "DNS configuration" that lists numbered resolvers, followed by a section called "DNS configuration (for scoped queries)". For now, write down only the first resolver in the first section. Note these lines:

  • nameserver[0] and any further nameserver lines. These are the addresses.
  • if_index with an interface name in brackets, for example en0. That is the network interface.
  • flags and reach, which describe the entry and whether it is currently reachable.
  • Any domain or search domain lines.

At home, the nameserver is usually your router, with an address such as 192.168.1.1 or 10.0.0.1. These are private addresses, reserved for local networks as described in RFC 1918. The router then forwards your questions to your internet provider's resolver or another one you set. On a cafe or hotel network the same pattern appears with the venue's router.

If you prefer a shorter answer, networksetup -getdnsservers Wi-Fi prints only DNS servers that were typed in by hand for that service. If it says "There aren't any DNS Servers set on Wi-Fi", the Mac is using whatever the network handed out. Change "Wi-Fi" to the exact service name if yours is different; networksetup -listallnetworkservices shows the names.

Save the baseline in a note. A screenshot of the Terminal window is enough.

Step two: read the list during the VPN session

Connect the VPN with VPNclient and wait until it shows as connected. Then run the same command again:

scutil --dns

Now compare it with the baseline. You are looking for what changed.

  1. Did a new resolver appear? A VPN that routes lookups through itself often adds an entry whose interface is a tunnel. Tunnel interfaces on macOS commonly have names beginning with utun followed by a number, but the exact name varies, so treat it as a hint rather than a rule.
  2. Which resolver is number 1? General lookups follow the first resolver without a domain restriction. If it now points to the tunnel interface, the system intends to send general lookups through the VPN.
  3. Is the old resolver still listed? It may remain, usually lower in the order or limited to scoped queries. Remaining in the list is not automatically a problem, but note it.
  4. Did anything stay exactly the same? If resolver number 1 is still your router's address with the same Wi-Fi interface, the system may not be routing general lookups through the VPN. Keep that observation for the next steps instead of jumping to a conclusion.

A second useful view is the system's network summary:

scutil --nwi

It shows which interfaces are active and in what order the system prefers them. If your tunnel interface appears and is preferred, that agrees with the resolver list. If the tunnel is not listed at all, the VPN may be connected in a way that does not create an interface the system recognises, which is worth a note, not an alarm.

An important honest limit: the app for macOS from the XPASS supplier does not use the macOS VPN configuration feature that appears in System Settings. So the VPN may not be listed under the VPN section there, and you should not expect it to be. The commands above read the live system state regardless of how the app sets things up, which is exactly why they are a better source of truth than a settings page.

Step three: run a test lookup and see who answered

Reading the list tells you what the system intends. A test lookup tells you what happened. Choose a hostname that you rarely use, so a cached answer is unlikely, for example a site you have not visited today.

Run:

dscacheutil -q host -a name example.org

This uses the same system lookup path that most apps use, and it shows the addresses returned. It does not say which resolver gave them, but it confirms that the system path works.

To see the resolver more directly, ask a question with dig, which ships with macOS:

dig example.org

In the output, near the bottom, find the line beginning with ;; SERVER:. It shows the resolver address that answered that query, with the port. Note two cautions about this tool. First, dig reads the system's resolver configuration itself, which is close to but not always identical to the path a normal app takes. Second, if the first nameserver is a local address belonging to the VPN, that is expected. A private virtual address is not a leak by itself. It becomes interesting only when it is the same address as your router's resolver recorded in step one.

Avoid choosing a server by hand with dig example.org @address when your goal is to identify the system's choice. Naming a server overrides the system and bypasses the very path you want to test. Use that form only to check whether a specific resolver is reachable.

For a path-based confirmation, you can also use an online test that reports which resolver contacted its servers. Pick one reputable test, write down the resolver name or organisation it reports, and compare it with your baseline. The article on how to check that DNS queries follow the VPN route goes into this test in more depth, and reading the interface on which a DNS reply arrives explains a more technical view.

Reading the result: a short comparison table

Use this table as a thinking aid, not as a verdict. Your own network may add details.

What you see during the VPN session A reasonable reading What to do next
Resolver 1 is on a tunnel interface, test shows the VPN side The system intends and appears to use the VPN path Note it as a good result
Resolver 1 unchanged: router address on the Wi-Fi interface General lookups may still use the local network Repeat the test, check the VPN app state, read the leak guide
Two resolvers, tunnel first, router lower Normal fallback arrangement is possible Confirm with an online test
Browser test shows a different resolver than Terminal A browser may use its own secure DNS provider Check the browser setting
Private address you do not recognise Could be a virtual VPN address or another router Check the interface name and compare with the baseline
Domain-limited resolver for a work domain Likely deliberate for names in that domain Ask whoever manages that network if unsure

A resolver belonging to the VPN side does not mean the VPN is "secure" in a sweeping sense. It means that for this test, on this Mac, at this time, lookups followed the path you hoped for.

Common reasons the answer surprises you

When the result is not what you expected, the cause is often one of these:

  • Browser secure DNS. Browsers can use DNS over HTTPS (described in RFC 8484) to their own provider. This hides the lookups from the system list, so Terminal and the browser disagree. Check the browser's privacy or security settings.
  • A manually typed DNS server. If you or a past setup entered a DNS server for your Wi-Fi service, it may take precedence. networksetup -getdnsservers Wi-Fi will show it.
  • Another networking tool. Content filters, firewall utilities, or a second VPN-like tool can add resolvers or take over lookups. Quit them and test again to see whether the result changes.
  • iCloud Private Relay. If you have it on, Safari traffic may be carried differently, which can confuse tests run from Safari. Test with one browser and note the setting.
  • Cached answers. A name you looked up a minute ago may be answered from cache. Use a name you have not used lately.
  • Timing. Right after the VPN connects, the resolver list may still be updating. Wait a few seconds and run scutil --dns again.

Do not clear caches or change DNS settings just because the result is unusual. Gather the facts first; changes are a second step.

A plain example

Mai has a MacBook with an Intel chip and uses a hotel Wi-Fi network. Before connecting, scutil --dns shows resolver 1 with nameserver 10.20.0.1 on interface en0. She writes that down. She connects the VPN and runs the command again. Resolver 1 is now a different private address on an interface called utun4, and the old 10.20.0.1 entry is still there, lower in the list.

She runs dig example.org and the SERVER line shows the new address. An online test names an organisation that is not the hotel. Her conclusion, honestly worded: "On this Mac, for this session, the system sent general lookups to the VPN side." She also opens her browser settings and finds that secure DNS is set to automatic, so she repeats the online test inside the browser and confirms the browser result matches.

Had the browser reported the hotel's provider, she would have known the problem was in the browser setting, not in the system list.

Limits and things to watch

  • The system list shows intent. A test shows one moment. Neither proves what every app does at all times.
  • Command output can change when the Mac wakes from sleep, switches Wi-Fi networks or reconnects the VPN. Re-run the routine after those events.
  • You cannot see the resolver's own logging from your Mac. Knowing who answered does not tell you what that resolver stores.
  • A VPN changes the route of your traffic. It does not stop websites or apps from collecting other information, and it does not make you anonymous.
  • Work or school networks may require their own DNS arrangements. Do not change them to pass a test, and follow your organisation's rules.
  • The read-only commands here are safe, but if you start changing DNS settings, write the old values down first so you can undo the change.

If the result is unclear and the tools disagree, your next stop can be the troubleshooting guide for Mac, or support for your pass.

Summary

Identifying the DNS resolver on a Mac during a VPN session takes four small steps: record the resolver before connecting, read scutil --dns and scutil --nwi during the session, run one clean test lookup with dig or an online test, and compare everything against your baseline. Remember the difference between the list the system holds, the resolver that actually answers, and apps that use their own provider, and describe your result in careful words. Once you know your pattern, a quick check after updates or network changes is enough. If you want a VPN pass to test this routine with, you can look at the options on the XPASS pricing page.

Frequently asked questions

Which Terminal command shows the DNS resolvers on a Mac?

Run scutil --dns. It prints every resolver the Mac knows, numbered, with the nameserver addresses, the network interface each one belongs to and any domain it is limited to. Resolver number 1 is usually the one used for general lookups.

Does the first resolver in scutil --dns always answer my lookups?

Not always. Domain-specific resolvers, search domains and apps with their own secure DNS setting can all take a different path. Treat the list as the system's intention and confirm it with a real test lookup.

Is a private address such as 192.168.1.1 or 10.x.x.x a problem during a VPN session?

It depends on whose address it is. A private address can be a router at home, or a virtual address that belongs to the VPN. Compare the address with what you recorded before connecting, and look at the interface name next to it.

Why does a browser show a different resolver than Terminal?

Many browsers can send lookups to a provider of their own with a secure DNS setting, which ignores the system list. Terminal tools usually follow the system settings instead, so the two views can disagree.

Do I need to repeat this check often?

No. Do it once after setting up, after a macOS update, and after you change network or DNS settings or install other networking software.

About the author

Bob Kanokphon Thongdee, founder of XPASS VPN

Bob Kanokphon Thongdee

  • Founder of XPASS VPN
  • Co-founder of eSIMonline.asia
  • More than 7 years in online marketing
  • Founder of Cojourney Visa and Cojourney Travel

Need a VPN for a short trip or a busy month?

XPASS sells prepaid passes for a set number of days. You pay once and nothing renews automatically.

See passes

Keep reading

Device Guides

How to Check for DNS Leaks on macOS

A Mac-focused routine for finding a DNS leak while a VPN is on: what to compare, which Terminal commands help, how to read the results and what usually causes leaks on macOS.

10 min read

VPN Security

How Can You Check Whether DNS Queries Follow Your VPN Route?

A leak test page tells you who asked. This guide shows how to follow the route itself: which adapter, which resolver address and which path your DNS questions actually take.

10 min read

VPN Basics

Can a VPN Change Which Network Interface Receives DNS Replies?

A DNS answer is not delivered to a random adapter. It comes back along the path the question took, and a VPN can change that path. This article explains how and what can go wrong.

11 min read