I'm using NetworkManager to connect to work via OpenVPN. It works nicely, but VirtualBox guests (connected to the host with NAT) can't resolve work-related hostnames.

The OpenVPN server pushes a "dhcp-option DNS" to the client, so the host CAN resolve those hostnames, but it looks like the guest cannot... Is this expected? Am I missing something?

(Both host and guest are Xubuntu Lucid)


Are you able to connect at all to any vpn-IP? First try to ping one of those IPs. If that's successful and you're unable to ping a vpn-hostname then you are facing a DNS problem.

What works for me is having the virtualbox network adapter set to Bridged and the interface set to the vpn (tap0 in my case). By the way, since the mode is bridged, if you're having a network issue on the guest it's very likely you're also having it on the host.

  • Ping works, but the pulldown doesn't show the VPN interface (tun0)... Anyway I noticed that if I reboot the VM while the VPN is up, the DNS does work, while if I just reconnect eth0 it doesn't... Strange! Thanks for your help though :) – Joril Dec 1 '11 at 8:48
  • Well the interface is one thing but you also have the possibility to choose the adapter type namely NAT or Bridge, etc. You can try changing it to Bridged. And yes I would always first start the vpn and then boot the VM. – rosch Dec 21 '11 at 18:21
  • I have it set to a bridged adapter but there is no tap0 option in the dropdown. It doesn't seem to work. I can't ping any ip address on the network. – danielcooperxyz Jan 23 '13 at 21:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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