I have set up a VPN connection on my MacBook Pro OS X 10.8.5 laptop, to my office network so I can access my AFP file server from home.

The VPN connection appears to be working correctly. The Status reads Connected and I am getting both a connect time and an IP address.

So far so good.

But when I go to Go > Connect to Server and try to connect using the local address (that works when I am at the office):

afp://192.168.1.104

I get the classic error

"The server may not exist or it is unavailable at this time"

I tried pinging the server from the command line and get a "No route to host"

As my IP address is not changing when the VPN is connected it is clear that not all my traffic is going through the VPN, so I thought I would try setting it up to route everything.

According to this post I should be able to re-direct all the traffic using this by setting the "Send all traffic over VPN connection" option under the Advanced menu in my VPN network settings.

I should be seeing something like:

enter image description here

But when I click "Advanced", what I see is this:

enter image description here

Any ideas where I am going wrong?

ifconfig output:

lo0: flags=8049 mtu 16384
    options=3
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
    inet 127.0.0.1 netmask 0xff000000 
    inet6 ::1 prefixlen 128 
gif0: flags=8010 mtu 1280
stf0: flags=0 mtu 1280
en0: flags=8863 mtu 1500
    ether 14:10:9f:d1:ba:93 
    inet6 fe80::1610:9fff:fed1:ba93%en0 prefixlen 64 scopeid 0x4 
    inet 192.168.1.65 netmask 0xffffff00 broadcast 192.168.1.255
    media: autoselect
    status: active
p2p0: flags=8843 mtu 2304
    ether 06:10:9f:d1:ba:93 
    media: autoselect
    status: inactive
utun0: flags=8051 mtu 1280
    inet 172.18.10.3 --> 172.18.10.3 netmask 0xffffffff 

Routing table

Internet:
Destination        Gateway            Flags        Refs      Use   Netif Expire
default            192.168.1.1        UGSc           40        0     en0 
default            utun0              UCSI            1        0   utun0
127                127.0.0.1          UCS             0        0     lo0
127.0.0.1          127.0.0.1          UH              3   112823     lo0
169.254            link#4             UCS             0        0     en0
172.18.10.3        172.18.10.3        UH              0       12   utun0
192.168.1          link#4             UCS             6        0     en0
192.168.1.1        8:76:ff:42:9a:17   UHLWIir        42     4836     en0    735
192.168.1.1        utun0              UHW3Ii          0       11   utun0      3
192.168.1.5        link#4             UHLWIi          1      198     en0
192.168.1.65       127.0.0.1          UHS             0        0     lo0  
192.168.1.110      link#4             UHRLWIi         0       49     en0     14
192.168.1.248      link#4             UHLWIi          0        2     en0 
192.168.1.253      a:76:ff:42:9a:17   UHLWIi          0      546     en0   1192
192.168.1.255      ff:ff:ff:ff:ff:ff  UHLWbI          0       12     en0
212.182.213.186    192.168.1.1        UGHS            0        0     en0

Internet6:
Destination                             Gateway                         Flags                Netif Expire
::1                                     link#1                          UHL             lo0
fe80::%lo0/64                           fe80::1%lo0                     UcI             lo0
fe80::1%lo0                             link#1                          UHLI            lo0
fe80::%en0/64                           link#4                          UCI             en0
fe80::1610:9fff:fed1:ba93%en0           14:10:9f:d1:ba:93               UHLI            lo0
ff01::%lo0/32                           fe80::1%lo0                     UmCI            lo0
ff01::%en0/32                           link#4                          UmCI            en0
ff02::%lo0/32                           fe80::1%lo0                     UmCI            lo0
ff02::%en0/32                           link#4                          UmCI            en0
  • @MariusMatutiae the ifconfig output if very long, is there a specific part I should post? – Finglish Dec 13 '13 at 17:33
  • your routing table, pls? – MariusMatutiae Dec 13 '13 at 17:47
  • @MariusMatutiae sorry i ment netstat -n, I have added the ifconfig output to the bottom of the question – Finglish Dec 13 '13 at 17:55
  • netstat -nr is really necessary, sorry – MariusMatutiae Dec 13 '13 at 18:39
  • @MariusMatutiae OK, got it. I have added the routing table – Finglish Dec 13 '13 at 18:51

I am not sure, for once, if this is a proper answer. I will make up for whatever is missing as we move on.

You have no VPN configured whatsoever. You routing table is correct for a pc connected to a local LAN, nothing else.

It is possible that the error is rooted in the fact that you seem to have (please correct me if I am wrong) the very same subnet at home and at work: 192.168.1.0/24. I deduce this from your current routing table, and from this statement of yours:

But when I go to Go > Connect to Server and try to connect using the local address (that works when I am at the office:

 afp://192.168.1.104

.....

If this is the case, no matter what other errors you may have in the configuration of the VPN, it will not work. In fact, there might be pcs with the same IP addresses, and in any case, when confronted with an address like, for instance, 192.168.1.104 your kernel, your local router, your remote router, will be unable to understand whether you are referring to an IP address this side of the tun0, or on the opposite side.

If I am right on this (same subnet for home and work), then we will be unable to make progress until this is sorted out.

  • Sorry, my VPN had turned itself off before I printed the table and I didn't notice (long day). I have updated it. The subnet issue sounds on the money. I guess I will have to change it on my home network. – Finglish Dec 13 '13 at 19:29

I just had the same issue on an iMac. The solution is two fold

  1. Make sure that the VPN connection is moved to the top of your networks list.
  2. Make sure that the VPN and your local network are not in the same range. If you VPN is giving you a 192.168.1.x IP address, update your router settings to assign 192.168.2.x addresses.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.