Chuck Risher

Q: After disconnecting from VPN, WiFi DNS servers change to VPN DNS servers

Greetings,

 

I have different DNS settings in WiFi and VPN (L2TP). When I connect to VPN then disconnect, the WiFi DNS settings are changed to the VPN DNS settings. I have to keep changing them back.

 

Thanks

MacBook Pro, OS X Mavericks (10.9.5), MacBook Pro (13-inch, Mid 2012)

Posted on Aug 23, 2016 3:35 AM

Close

Q: After disconnecting from VPN, WiFi DNS servers change to VPN DNS servers

  • All replies
  • Helpful answers

  • by BobHarris,

    BobHarris BobHarris Aug 23, 2016 5:47 AM in response to Chuck Risher
    Level 6 (19,257 points)
    Mac OS X
    Aug 23, 2016 5:47 AM in response to Chuck Risher

    Create a VPN specific Network Location and switch the Network Location when going to and from the VPN connection.

     

    System Preferences -> Network -> Locations -> Edit Locations...

     

    Select your "Automatic" location, then click on the Gear icon at the bottom of the dialog and choose "Duplicate"

     

    Give the new location a unique name, such as My_VPN_to_XYZ

     

    Now edit the location to have DNS settings you need for the VPN to work correctly.  And change any other Network profile items you need for the VPN and they will remain associated with the My_VPN_to_XYZ location.

     

    Now you can use the

    Apple menu icon -> Locations -> Automatic

    Apple menu icon -> Locations -> My_VPN_to_XYZ

    to quickly and easily switch between the preset Network locations

     

    If you really want to get tricky, you can use a utility such as ControlPlane

    <http://www.controlplaneapp.com/feature-list/>

    and create triggers that will cause ControlPlane to automatically switch your Network Location when you start/stop your VPN connection.