Is Your VPN Killing Your Network Connection?

Terminal Ping Failure

Overview

If you use VPN on MacOS you may notice that if you leave the VPN running for a while your normal network operations are affected. It would appear the VPN software may not be properly restoring your DNS (Domain Name Server). Here’s how to find out if that’s the problem, and how to fix it.

Is it a DNS problem?

Open the Terminal.app and ping a know IP address. The one I find easiest to remember is 1.1.1.1. If that responds, then ping a domain via its name. In the image at the top you can see I pinged the DNS with no problem, but pinging www.google.com did not work. This is a good sign that you have a DNS problem.

Six Step Recovery Process (faster than rebooting)

Step 1 - Launch the Network System Preferences panel.
System Preferences

Step 2 - Click the Advanced… button. Spoiler alert, you’ll come back here to click Apply as the last step.
Network Preferences

Step 3 - click the DNS tab at the top of the Advanced window
Advanced Network Preferences

Step 4 - drag your DNS Servers: entries to be in a different order. If you only have one, add another one (either of the two shown here will work).

Step 5 - Once you have a different DNS server on Top click OK.

This will take you back to the previous screen and now you can do

Step 6 - click Apply.
Your network should be working properly. You can repeat the original terminal test or just use a browser to go to a page.