Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a VirtualBox machine running on my Mac and I can connect to it without problems, for example using SSH:

$ ssh user@
user-centos-6:~ user $

As soon as I connect to a VPN from the Mac, though, the SSH connection is closed and I cannot reach the VM anymore:

$ ssh user@
ssh: connect to host port 22: Permission denied
$ ping
PING ( 56 data bytes
ping: sendto: Permission denied
ping: sendto: Permission denied
Request timeout for icmp_seq 0

Given I'm a network newbie, how can I debug the situation?


Output from netstat -nr before enabling the VPN:

default          UGSc          273        0     en0
...        XXX                UHLWIir       274     3247     en0   1197      ff:ff:ff:ff:ff:ff  UHLWbI          0       18     en0
192.168.12         link#7             UC              2        0 vboxnet     YYY                UHLWIi          0     2116 vboxnet   1054     ff:ff:ff:ff:ff:ff  UHLWbI          0       18 vboxnet

The above is essentially the same after enabling the VPN.

The VM has two network adapters:

  • NAT
  • Host-only adapter (vboxnet0)
share|improve this question

1 Answer 1

Your VPN is probably changing your network routes and/or default gateway. Check the output of "netstat -nr" and look for the default route when you're connected/disconnected to the VPN. You may be able to get around this by using a private network between your VM and host machine. If the VM is using a bridged adapter, changes to network configuration could well prevent access.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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