I'll ask my question first, then give details about where I am coming from:

Is it possible to use host only, then have host (Ubuntu) act as a proxy to provide internet access to the guest (Windows)? If so, how?

I am trying to get the right combination of networking for my VirtualBox Windows client VM (Windows 7). My host is Wbuntu 10.10 (Maverick).

I believe I understand the basic network options (please correct me if I am incorrect):

NAT - Host can't communicate with guest but guest has access to all host's adapters

Host only - Separate adapter but guest has no net access

Bridged - bridge an adapter in the host with the virtual adapter to give the host access to the host adapter

I am trying to give my win guest internet access, but also access the host in a separate network.

Bridged only works when the host is connected to the internet (this is a laptop) so when it's not connected the network is down.

Thanks I appreciate your help.

  • Do I understand correctly that you want to access the VM from another machine? Apr 2, 2011 at 2:18
  • I want the best of both worlds - I want my guest to have access to the internet, and I want a network connection between guest/host. The only way I could see this happening is connecting the host to the guest, then have a proxy server setup on the host to provide internet access to the guest.
    – Russell
    Apr 2, 2011 at 2:21
  • Bridging actually puts the VM on the network so it will work almost like a completely separate computer when it comes to networking. What about 2 virtual network adapters? Apr 2, 2011 at 2:29
  • @Reuben - yeah, but when the network is disconnected (eg laptop out of the office), there is no longer a connection between the host and guest on the laptop.
    – Russell
    Apr 2, 2011 at 2:36
  • Since then, I have done this quite simply - I enable two network adapters, one using NAT for internet, and one for host only. Works great!
    – Russell
    Jan 19, 2012 at 6:15

3 Answers 3


Ok well I finally got it working.

I have installed the Squid proxy server on my Ubuntu host, and added the virtualbox adapter.

This link was very useful for quickly getting squid running: http://www.ubuntugeek.com/how-to-setup-transparent-squid-proxy-server-in-ubuntu.html

All I need to do now is fix a little issue I am having with the vboxnet0 adapter but all good.


Internet access in Virtualbox Host-only networking


  • 3
    Welcome to Ask Ubuntu! While this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. Feb 13, 2012 at 15:32

I have ended up having two network adapters enabled on the guest, one NAT, one host-only. That gives Internet access AND host access.

You must log in to answer this question.

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