Resolved: DNS Lookup Order with VPN on OSX

Resolved: DNS Lookup Order with VPN on OSX

Question: Why can’t I access intranet resources over my VPN connection?

After performing an update on my Mac I wasn’t able to access intranet resources over my VPN connection. Further troubleshooting revealed that via IP address I could access servers but the DNS resolution wasn’t working.

Answer: Because you are not using your intranet’s DNS Server

Many people are having issues when connecting to the VPN because the DNS preference of your local connection vs your remote one. However, the solution to his problem is quite simple and it is almost given by the question itself (when talking about connection preference.)

There are several workarounds, but the easy solution is that you need to give your VPN connection a higher order in the network settings so that the VPN DNS Server is queried before the main internet connection’s DNS is.

To do this simply follow this instructions:

  1. Go to the Network section in the System Preferences.
  2. On the bottom use the gear icon and select the (probably fourth) option that reads roughly “Establish the order of the services” (I say roughly because my system is in Spanish and I don’t have one in English to see the exact text)
  3. There, simply drag and drop your VPN connection above your internet connections; or for that matter above it all so it’s number 1. This will make the VPN’s DNS Server the preferred choice helping you resolve DNS names for your intranet.

and you’re done!

I am not sure why, but probably during an update or something the “service order” in “Network Preferences” moved around a little and when I originally set up my VPN connection it was in the correct order for me so I never realized this was a feature/option. Took a while to find but glad it wasn’t something overly complex.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.