7

I'm using a MacBook Pro. I've set up the VPN using settings that were on my Windows laptop.

I can connect to the VPN and see everything on the office network (ping IP addresses, view intranet sites by IP address, among others). However, nothing is accessible on the Internet. I can't even ping google.com.

I've tried sending all traffic over VPN and turning that option off. Nothing seems to work.

Does anybody have an answer for this?

EDIT:

I'm using the default VPN client on OS X, PPTP.

4
  • What VPN client are you using? Does the Windows laptop still allow you to get to google.com when connect to the VPN?
    – Paul
    Dec 15, 2011 at 23:21
  • Good question -- and if you're using the native VPN client built into OS X, what sort of VPN connection is it? L2TP over IPSec, PPTP, Cisco IPSec? Dec 15, 2011 at 23:53
  • Sorry- using the default VPN client in OS X, PPTP Have updated question
    – alex
    Dec 16, 2011 at 11:10
  • I have this issue too. An easy fix is usually to create another VPN adapter in the system preferences. Try that.
    – potatoman
    Nov 27, 2015 at 1:48

2 Answers 2

5

Your VPN server has not enabled split tunnelling, therefore all traffic is redirected through the tunnel. When the VPN client connects, it changes the default route of your machine.

The solution is to remove the rogue default route and add back your original default gateway.

To discover the IP address of your default gateway:

  • disconnect from the VPN
  • go to System Preferences -> select your network connection -> click Advanced -> TCP/IP
  • look under 'Router'

Assuming that:

  • you use your VPN tunnel to access the subnet 192.168.108.0/24
  • your default gateway is 192.168.0.1

then you must:

  • first connect to the VPN
  • then use the route command to change the default gateway back to the original value
  • and add a static route to the VPN subnet

The last two steps translate into these commands:

sudo route -nv add -net 192.168.108 -interface utun0
sudo route change default 192.168.0.1

If you can ping public IPs, but you can't resolve hostnames, it means the VPN client also replaced your DNS servers.

Go to System Preferences -> select the VPN connection -> click Advanced -> manually enter the IPs of your DNS servers there, to override the ones sent by the VPN server.

4
  • DNS didn't work for me.
    – Necktwi
    Nov 13, 2017 at 15:36
  • Can you reach hosts outside the VPN by using their IP addresses? Nov 15, 2017 at 10:14
  • How can you find out what subnet your VPN tunnels to?
    – Brian Kung
    Aug 26, 2019 at 12:18
  • there is no easy way indeed. Assuming you know the hostnames or IPs that you want to connect to, identify a subnet that includes most of them or use multiple subnets to group them together. It's basically just guesswork, I'm afraid. Alternatively kindly ask the admin of the VPN to provide the subnet list, he has the full list in his openvpn server conf file. Aug 26, 2019 at 16:14
0

Try going to google via IP address -- try http://74.125.115.104/

If that works, I'll bet that your VPN blocks whichever name servers you were using without the VPN connection. On windows it probably set you up to use company-managed DNS servers.

If this is the problem, possible solutions:

  • Manually configure your name servers to use the company-managed DNS servers
  • Try different publicly accessible name servers (e.g opendns or google's public DNS or find others using namebench)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .